UIPopover without any arrows
Yes it is possible just do: [self.popoverController presentPopoverFromBarButtonItem:anItem permittedArrowDirections:0 animated:YES]; The zero represent no direction.
Yes it is possible just do: [self.popoverController presentPopoverFromBarButtonItem:anItem permittedArrowDirections:0 animated:YES]; The zero represent no direction.
This fixed it for me after I had the same issue (coincidently also today): EDIT : As contentSizeForViewInPopover is deprecated in iOS7.0 so use preferredContentSize. Original answer below: In your detailViewController add this: – (void)viewWillAppear:(BOOL)animated { CGSize size = CGSizeMake(320, 480); // size of view in popover self.contentSizeForViewInPopover = size; [super viewWillAppear:animated]; } You also … Read more
EDIT: These problems appear to be fixed as of iOS 7.1 / Xcode 5.1.1. (Possibly earlier, as I haven’t been able to test all versions. Definitely after iOS 7.0, since I tested that one.) When you create a popover segue from a UIBarButtonItem, the segue makes sure that tapping the popover again hides the popover … Read more
You can override the default adaptive behaviour (UIModalPresentationFullScreen in compact horizontal environment, i.e. iPhone) using the adaptivePresentationStyleForPresentationController: method available through UIPopoverPresentationController.delegate. UIPresentationController uses this method to ask the new presentation style to use, which in your case, simply returning UIModalPresentationNone will cause the UIPopoverPresentationController to render as a popover instead of fullscreen. Here’s an example … Read more
I was struggling with the same issue. None of the above solutions worked for me pretty nicely, that is why I decided to do a little investigation and find out how this works. This is what I discovered: When you set the contentSizeForViewInPopover in your view controller it won’t be changed by the popover itself … Read more
In IOS6 you have supported interface orientations in three places: The .plist (or Target Summary Screen) Your UIApplicationDelegate The UIViewController that is being displayed If you are getting this error it is most likely because the view you are loading in your UIPopover only supports portrait mode. This can be caused by Game Center, iAd, … Read more
UIPopoverControllers should always be held in an instance variable. It is a good practice to create a strong property for it. UPDATE: As of iOS 8 you should be using UIPopoverPresentationController. Then you don’t need to keep a reference to the popover because it is managed by the presentation controller. Code example (works both on … Read more
Okay, A housemate took a look at it and figured it out: func addCategory() { var popoverContent = self.storyboard?.instantiateViewControllerWithIdentifier(“NewCategory”) as UIViewController var nav = UINavigationController(rootViewController: popoverContent) nav.modalPresentationStyle = UIModalPresentationStyle.Popover var popover = nav.popoverPresentationController popoverContent.preferredContentSize = CGSizeMake(500,600) popover.delegate = self popover.sourceView = self.view popover.sourceRect = CGRectMake(100,100,0,0) self.presentViewController(nav, animated: true, completion: nil) } That’s the way. You … Read more