Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func forwardPage() {
- print("Start")
- currentPage += 1
- print(vcs[currentPage])
- self.setViewControllers([vcs[currentPage]], direction: .forward, animated: true) { (true) in
- print("Done")
- }
- }
- protocol WalkthroughViewControllerDelegate {
- func forwardPage()
- func currentIndex() -> Int
- }
- @IBAction func nextButtonTapped(_ sender: Any) {
- if let index = delegate?.currentIndex() {
- print("Here... (index)")
- switch index {
- case 0...1:
- print("Forwarding...")
- delegate?.forwardPage()
- case 2:
- dismiss(animated: true, completion: nil)
- default: break
- }
- }
- updateUI()
- }
Add Comment
Please, Sign In to add comment