Like other iOS8 users, I get a warning:
Presenting view controllers on detached view controllers is discouraged <EditItineraryViewController: 0x7ca56e00>.
This is caused by the following code:
- (void)editActivityDetailsForIndexPath:(NSIndexPath *)indexPath { NSPredicate *predicateForDisplay = [[NSPredicate alloc] init]; switch (indexPath.section) { case kIncompleteActivitiesSection: predicateForDisplay = _predIncomplete; break; case kCompleteActivitiesSection: predicateForDisplay = _predComplete; break; default: break; } NSString *theActivityName = [[NSString alloc] init]; theActivityName = [[[_activitiesArray filteredArrayUsingPredicate:predicateForDisplay] objectAtIndex:indexPath.row] activityName]; UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; ActivityDetailViewController *activityDetailVC = [storyboard instantiateViewControllerWithIdentifier:@"ActivityDetailView"]; activityDetailVC.modalPresentationStyle = UIModalPresentationFormSheet; activityDetailVC.delegate = self;
This is an iPad application, and in this case, the popover is presented in such a way that its small pointer points to the "i" icon, which is located in the tableview cell as a table.
This works in three other places in my application without causing a warning at all. But for some reason, with this implementation, this raises a warning. The strange thing is that this was the first place in my application. I used this tool to represent a popover from a tableview cell, and other instances are just copies of this code!
Any ideas that I can look at to find out where the hierarchy is distorted? Is this related to how the tableview cell is generated, and then this popover is presented on top of it, or should it do strictly with the popover itself? Or it may be related to the table. I donโt even know where to start looking.
Many thanks!
source share