Everybody says UIPopoverController
work on iOS 8.
But if i test my app in iPhone simulator it getting crashed and log says:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIPopoverController initWithContentViewController:] called when not running under UIUserInterfaceIdiomPad.'
This code works fine on iPad simulator.
My Development Target
set to 8.4
UIViewController* viewController = [[UIViewController alloc] initWithNibName:@"StyleMenu" bundle:nil];
self.stylePopover = [[UIPopoverController alloc] initWithContentViewController:viewController];
self.stylePopover.popoverContentSize = CGSizeMake(250,200);
[self.stylePopover presentPopoverFromBarButtonItem:styleBarButton
permittedArrowDirections:UIPopoverArrowDirectionUp
animated:YES];
any help would be appreciated.