uipopovercontroller

Turning off dimming by UIPopoverController

醉酒当歌 提交于 2019-12-24 03:28:28
问题 In iOS7, a popover causes the rest of the screen to be dimmed. As per the Apple docs: The popover content is layered on top of your existing content and the background is dimmed automatically. This is nice in most cases, but I have an app where the screen rearranges itself when the popover opens and stays responsive, so the dimming only causes confusion. Anyone knows if dimming can be disabled? 回答1: Doesn’t look like there’s anything in the API to support that—you can set the passthroughViews

UIViewAlertForUnsatisfiableConstraints when presenting popover controller on iOS8 iPad

强颜欢笑 提交于 2019-12-24 03:16:47
问题 UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"What would you like to do?" message:@"" preferredStyle:UIAlertControllerStyleActionSheet]; [alert addAction:...] //left out for brevity of post UIPopoverPresentationController *pop = [alert popoverPresentationController]; pop.sourceView = self.view; pop.sourceRect = self.view.frame; pop.permittedArrowDirections = UIPopoverArrowDirectionAny; [self presentViewController:alert animated:true completion:^{ }]; The methods in

UITableViewCell's attributes are nil when instantiating UITableView as a popover

倖福魔咒の 提交于 2019-12-24 00:26:39
问题 I have a UIViewController with a UISegmentedControl from which I'd like to present a UITableViewController as a popover when I click on a segmentedControl segment. The issue I'm having is the moment I click on a segment, the popover starts to load, but crashes as myPopoverTableViewController loads. It crashes in override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell , saying the attributes of my PopoverTableViewCell are nil . For simplicity's

issue with positioning of pop over view

走远了吗. 提交于 2019-12-23 13:25:15
问题 When I am switching between Portrait to Landscape view (&Vice Versa) in iPad, position of my popover view gets garbled. Here is how I am calculating frame of my popover view: aRect = self.myElement.frame; aRect.origin.x += aRect.size.width; [aPopOver presentPopoverFromRect:aRect inView:self.myElement.superview permittedArrowDirections:UIPopoverArrowDirectionRight animated:YES]; Please tell me whats wrong here? 回答1: ok, i notice something weird about your code. any reason you are adding the

UIPopoverController toolbar at top

守給你的承諾、 提交于 2019-12-23 10:53:09
问题 I am trying to place a UIToolbar at the top of a UIPopoverController in much the same way as Apple have done in pages and keynote with the "media", "tables", "charts" "shapes" toolbar. I've managed to place one at the bottom using the same method described as in this post but I'm unable to move it to the top. I can do it by just placing a normal UIToolbar within one of the child view controllers however the toolbar does not seem to follow the same line as the border and doesn't look as nice

UIPopoverController dismiss on 'tap off' - how do I detect this event?

痞子三分冷 提交于 2019-12-23 10:25:21
问题 I am using a UIPopover on my navigation bar. I have several UIBarButtonItems and the popover extends from one of these. When the popOver is activated I changed the style of the button to UIBarButtonItemStyleDone . However, the popOver is dismissed by tapping off the UIPopoverController as expected, but upon this I want to change the style back to UIBarButtonItemStyleBordered . Is there a way I can detect if the UIPopOverController is closing? And therefore piggyback this for my own needs? 回答1

disable dismissal of uipopoverview controller

不打扰是莪最后的温柔 提交于 2019-12-23 05:52:25
问题 UIPopoverController automatically dismisses when we tap or touch outside the popoverview . I want to restrict this automatic popover dismissal. 回答1: self.myPopovercontroller.passthroughViews=[NSArray arrayWithObject:self.view]; 回答2: Duplicate of "is there a way NOT to have the popover dismissed when pressing outside it?" There is a very simple and legit solution. In the view controller that presents your UIPopoverController , conform to the UIPopoverControllerDelegate protocol and implement

disable dismissal of uipopoverview controller

笑着哭i 提交于 2019-12-23 05:52:07
问题 UIPopoverController automatically dismisses when we tap or touch outside the popoverview . I want to restrict this automatic popover dismissal. 回答1: self.myPopovercontroller.passthroughViews=[NSArray arrayWithObject:self.view]; 回答2: Duplicate of "is there a way NOT to have the popover dismissed when pressing outside it?" There is a very simple and legit solution. In the view controller that presents your UIPopoverController , conform to the UIPopoverControllerDelegate protocol and implement

Error using UIPopoverController

烈酒焚心 提交于 2019-12-23 05:27:49
问题 In my current app, I am trying to make a menu screen apear when I click a tool bar button. I found that the best way to do this is to use a UIPopoverController to show a custom view that I have created. However, something about my current code is flawed. When I run my app and push the button, I get an error that says that it is reaching dealoc while the popover is still visible. Even after looking at several examples of similar problems, I can't for the life of me figure out how to fix this.

Require UISplitViewController to lazy load multiple view controllers for detail view controller

荒凉一梦 提交于 2019-12-23 03:56:24
问题 Well, might not be clear with the title. I have pulled this right out of the MultipleDetailView sample code from Apple. Every time the user selects a row from the table in the pop over, detailViewController is allocated the FirstDetailViewController and SecondDetailViewController again. Instead of allocating and initializing the view controller over and over, I want to assign the existing and already allocated and initialized view controller if existing to the detailViewController on the