From b90c56d0b988c8595d53840e62f6b0bd19e1ef61 Mon Sep 17 00:00:00 2001 From: Bruno Muniz Date: Fri, 24 May 2019 09:28:19 -0700 Subject: [PATCH 1/2] Fix issue with pushing on navigation controller --- BWWalkthrough/BWWalkthroughViewController.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BWWalkthrough/BWWalkthroughViewController.swift b/BWWalkthrough/BWWalkthroughViewController.swift index bba2d03..e489518 100755 --- a/BWWalkthrough/BWWalkthroughViewController.swift +++ b/BWWalkthrough/BWWalkthroughViewController.swift @@ -97,6 +97,12 @@ import UIKit scrollview.showsVerticalScrollIndicator = false scrollview.isPagingEnabled = true super.init(coder: aDecoder) + + if #available(iOS 11.0, *) { + scrollview.contentInsetAdjustmentBehavior = .never + } else { + self.automaticallyAdjustsScrollViewInsets = false + } } override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { From 9d0906fa291021ef247333926e0153e26db92987 Mon Sep 17 00:00:00 2001 From: Bruno Muniz Date: Fri, 24 May 2019 16:11:13 -0700 Subject: [PATCH 2/2] Changes next page function --- BWWalkthrough/BWWalkthroughViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BWWalkthrough/BWWalkthroughViewController.swift b/BWWalkthrough/BWWalkthroughViewController.swift index e489518..4591538 100755 --- a/BWWalkthrough/BWWalkthroughViewController.swift +++ b/BWWalkthrough/BWWalkthroughViewController.swift @@ -143,9 +143,9 @@ import UIKit // MARK: - Internal methods - @IBAction open func nextPage(){ + delegate?.walkthroughNextButtonPressed?() + if (currentPage + 1) < controllers.count { - - delegate?.walkthroughNextButtonPressed?() gotoPage(currentPage + 1) } }