ios - UIPageViewControllerDataSource - segueForUnwindingToViewController not being called -
I have a UIViewController that is installed as a UIPageViewControllerDataSource named MainPVC.swift. This is my entry point on my storyboard In it, I'm instantiating another UIViewController called TrackerVC which is set in my storyboard - but not connected to MainPVC by segue
instantiating TrackerVC:.
Function ViewerTruth Index (Index: Int) - & gt; TrackerVC {go childViewController = self.storyboard? TrackerVC childViewController.screenIndex = Index return childViewController} as a .instantiateViewControllerWithIdentifier ("trackerVC") I have another UIViewController named NotesVC. When I press a button on Trevorcci, I use a custom UIStoryBoardSegue to display the notice. Notes On the VC, I have another button that I want to go back to TrackerVC using another custom UIStoryboardSegue via Anwarund. The buttons used in the canceled NotesVC: @IBAction function CancelButtonTapped (this: AnyObject) {self.performSegueWithIdentifier ("unwindFromNotesSegue", this : Self)}
Now with your problem -
When I push the button on the trackerv, the custom UIStoryboardSegue works well and hopes as the displays displays. However, when I tap the button on NotesView, the custom UITROboardboard SEG is ignored and the generic segue that slides down the view is used.
I have ascertained the issue from below that the call to TrackerVC is not being made. All my connections are properly set up in my storyboard and all the necessary methods (opening the method).
I have also tried to create a 3 UIViewController and tried to display it with Unwind by using custom UIStoryboardSegues and making notes from the VCs and everything works fine as expected. The notes to segueForUnwindingToViewController are being called on the VC
Thanks for any help!
Do you have navigationController attached? You may need a navigation controller sub-class and add the segueForUnwindingToViewController to it there. This is what I did the solution to a similar problem.
Comments
Post a Comment