uipopovercontroller

How to correctly present a popover from a UITableViewCell with UIPopoverArrowDirectionRight or UIPopoverArrowDirectionLeft

血红的双手。 提交于 2019-11-26 15:44:54
问题 I always try to present a popover from a cell inside a tableView this way: [myPopover presentPopoverFromRect:cell.frame inView:self.tableView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; but I cannot use UIPopoverArrowDirectionRight or Left, because, depending on the position of the ipad (portrait or landscape), the popover appears someplace else. Am I presenting the popover the right way? PS: the table view is in the detailView of a splitView. 回答1: Here is the simple

How to present popover properly in iOS 8

折月煮酒 提交于 2019-11-26 15:37:08
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!.setPopoverContentSize(CGSizeMake(550, 600), animated: true) popover!.delegate = self popover!.presentPopoverFromBarButtonItem

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

梦想的初衷 提交于 2019-11-26 14:07:54
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" through the view stack via the navigation bar's Back button, the popover doesn't change size-- it remains

UIPopOverController for iPhone (currently only available for iPad)

大城市里の小女人 提交于 2019-11-26 12:56:41
问题 Before I implement something similar for the iPhone, I\'m wondering if anyone has implemented something similar of the UIPopOverController for the iPhone . This is so far only available for iPad. 回答1: See my implementation here: https://github.com/werner77/WEPopover It has the same interface as the UIPopoverController but is generalized for iPhone and with support for custom background views. 回答2: I have provided another alternative SGPopoverController at http://github.com/KJoyner/SeaGlass.

UISplitViewController in a TabBar ( UITabBarController )?

允我心安 提交于 2019-11-26 11:54:32
问题 I am in kind of situation that I need to start with a tab based application and in that I need a split view for one or more tabs. But it seems that split view controller object can not be added to the tabbarController. (Although tabbar object can be added to the splitviewcontroller). The problem can be seen otherways: I have a full screen in the left part I have a table view when any row is selected in the table a popover should come out pointing that row. Now when any row in the popover is

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

送分小仙女□ 提交于 2019-11-26 11:43:46
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. 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

UIPopoverPresentationController on iOS 8 iPhone

老子叫甜甜 提交于 2019-11-26 11:16:05
Does anyone know if UIPopoverPresentationController can be used to present popovers on iPhones? Wondering if Apple added this feature on iOS 8 in their attempt to create a more unified presentation controllers for iPad and iPhone. Not sure if its OK to ask/answer questions from Beta. I will remove it in that case. Ivan Choo You can override the default adaptive behaviour ( UIModalPresentationFullScreen in compact horizontal environment, i.e. iPhone) using the adaptivePresentationStyleForPresentationController: method available through UIPopoverPresentationController.delegate .

Popovers cannot be presented from a view which does not have a window

坚强是说给别人听的谎言 提交于 2019-11-26 11:15:42
问题 What does this error indicate: \"Popovers cannot be presented from a view which does not have a window.\" 回答1: the view you're adding the popover to has to already have been added to a window with the "addSubview:" method. Try waiting until - (void) didMoveToWindow is called for the view and then load the popover 回答2: the thing that saved my life: if (self.view.window != nil) [popoverController presentPopoverFromRect:CGRectMake(44, yCoord, 111, 111) inView:self.view permittedArrowDirections

How to customize / style a UIPopoverController

给你一囗甜甜゛ 提交于 2019-11-26 09:07:45
问题 I\'m working on an iPad application and I\'m using UIPopoverControllers. I\'m at the part where the app needs to be branded and styled and i\'m wondering how to change the color / tint of the UIPopoverController? Standard is dark blue but it needs to be another color.. is this possible? Greets, Thomas 回答1: This is possible starting in iOS 5.0 by subclassing the abstract class UIPopoverBackgroundView and assigning your subclass to the popoverBackgroundViewClass property on your

iPhone popup menu like iPad popover?

若如初见. 提交于 2019-11-26 06:33:32
问题 How can i implement this popup menu in iphone app like a popover in ipad? EDIT : This is the best at moment: https://github.com/runway20/PopoverView 回答1: Have a look at the iPhone UIPopoverController implementation: WEPopover 回答2: iOS 8 and later Beginning with iOS 8, you can use UIPopoverPresentationController for iPhones in addition to iPads. Setup Add a UIBarButtonItem to your main View Controller. Add another View Controller to the storyboard. Change it to the size that you want the