-
Notifications
You must be signed in to change notification settings - Fork 69
calling moveToPage from another View Controller #63
Copy link
Copy link
Open
Description
When I try to call moveToPage from another class it fails on this line:
let currentIndex = stackPageVC.index(of: currentStackVC)!
with the error:
fatal error: unexpectedly found nil while unwrapping an Optional value
here is my code:
//View controller where the call is started
@IBAction func buttonRightView(_ sender: Any) {
let vc:ViewController = storyboard?.instantiateViewController(withIdentifier: "ViewController") as! ViewController
vc.goRight()
}class ViewController: EZSwipeController {
override func setupView() {
datasource = self
navigationBarShouldNotExist = true
}
func goRight(){
moveToPage(1, animated: true)
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels