Vote count:
0
I have a UIPageViewController that displays two UIViewControllers and allows the user to swipe between the two. I implemented a button that allows the user to manually switch between the two. The code to execute this is as follows:
[self setViewControllers:@[[self.storyboard instantiateViewControllerWithIdentifier:@"PlayersViewController"]] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:^(BOOL completion){}];
Unfortunately, every time I press the button, I get an exception that says:
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
I call the method from my custom class that extends the UIPageViewControllerDelegate.
Any help would be much appreciated!
asked 1 min ago
Aucun commentaire:
Enregistrer un commentaire