uipopovercontroller

How to present popover properly in iOS 8

这一生的挚爱 提交于 2019-11-26 04:05:23
问题 I\'m trying to add a UIPopoverView to my Swift iOS 8 app, but I am unable to access the PopoverContentSize property, as the popover does not show in the correct shape. my code: var popover: UIPopoverController? = nil func addCategory() { var newCategory = storyboard.instantiateViewControllerWithIdentifier(\"NewCategory\") as UIViewController var nav = UINavigationController(rootViewController: newCategory) popover = UIPopoverController(contentViewController: nav) popover!

Popover with embedded navigation controller doesn't respect size on back nav

点点圈 提交于 2019-11-26 03:48:14
问题 I have a UIPopoverController hosting a UINavigationController, which contains a small hierarchy of view controllers. I followed the docs and for each view controller, I set the view\'s popover-context size like so: [self setContentSizeForViewInPopover:CGSizeMake(320, 500)]; (size different for each controller) This works as expected as I navigate forward in the hierarchy-- the popover automatically animates size changes to correspond to the pushed controller. However, when I navigate \"Back\"

Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'

一笑奈何 提交于 2019-11-26 02:31:51
问题 My app (iPad;iOS 6) is a landscape only application, but when I try using a UIPopoverController to display the photo library it throws this error: Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES. I\'ve tried changing a lot of the code around but I\'ve had no luck. 回答1: In IOS6 you have supported interface orientations in three places: The .plist (or Target Summary Screen) Your UIApplicationDelegate The UIViewController that is being