I have an app with a sidebar that has different functions. On two of these controllers I have the peek / pop working. If during a session of the app I use one or the other controller, both the peek and the pop work just fine. If I use both controllers, the peek works in both but the pop is never getting called.
To reiterate, this is getting called every time:
- (nullable UIViewController *)previewingContext:(id <UIViewControllerPreviewing>)previewingContext viewControllerForLocation:(CGPoint)location {
This is only getting called if I dont switch views:
- (void)previewingContext:(id <UIViewControllerPreviewing>)previewingContext commitViewController:(UIViewController *)viewControllerToCommit {