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.
Yes, it is possible starting from iOS8. I have already gave answer to similar question and even implemented a useful class to work with popovers on iPhone and even put some custom elements there, such as
UITableView,WKWebView, you name it.You can check out my answer and link to class here: https://stackoverflow.com/a/30418212/2924920