uipopovercontroller

UIPopoverController dealloc getting called—ARC environment

拈花ヽ惹草 提交于 2019-12-03 09:59:07
While displaying a popover controller for a second time (after dismissing it and then re-displaying it), I get the following error: Terminating app due to uncaught exception 'NSGenericException', reason: '-[UIPopoverController dealloc] reached while popover is still visible.' The stack trace is only a bunch of hex and the SIGABRT happens at UIApplicationMain every time. Here's the code that the button triggers: - (IBAction)createNewScore:(id)sender { if (self.pc) if (self.pc.popoverVisible) return; else // Breakpoint is hit here—crashes after this line [self.pc presentPopoverFromBarButtonItem:

How to create Popovers with Xcode Storyboards

本秂侑毒 提交于 2019-12-03 09:00:35
问题 How can I create a popover in an iPad Storyboard for an iOS 5.0+ app? There's already one setup with the Xcode Project Template (Utility App), but I can't seem to figure out how Apple got it to work. I tried to mimic it, but only got errors. I even looked on Apple's Dev Site, but only got out-dated code that resulted in warnings and build errors. I have a CBMainView and a CBMasterView (with the exception of the master view already included), and a UIToolbar with a UIToolbarButton . I need the

Can I remove the arrow in the popover view?

人走茶凉 提交于 2019-12-03 07:54:35
I am asked to removed the arrow of the popover view. Is that violating human interface guidelines ? Is it wise to show a popover inside another popover ? If it is not violating human interface guidelines how to do that ? Hiding the popover arrow or showing one popover inside another does not sound very wise. I’m not sure if this is explicitly forbidden by the HIG, but it’s a usability drawback anyway. If you insisted you could draw your own arrowless popover or try to mask the arrow using some view composed on the top of it. I think it would be much better to rethink the UI. Phil For Swift

How to setup Popover views to dismiss properly

倖福魔咒の 提交于 2019-12-03 07:09:45
After some work I've got a popover view displaying a custom uiview inside of it appearing properly. When you tap outside of the popover view it dismisses as expected, however I'd also like it to dismiss when a button inside it is tapped, is there any one who can help me with that? Struggling to find a concise guide. To dismiss the popover manually, you'll need to keep a reference to it. A good place would be in the view controller that shows the popover. To have the button inside the content view controller tell the original view controller (that presented the popover) to dismiss the popover,

Remove the inner shadow that UIPopoverController creates

99封情书 提交于 2019-12-03 06:56:00
问题 I am creating a custom layout of the popover that iOS provides. I have subclassed the UIPopoverBackgroundView and got it to draw the background for my popover correctly. My problem is now that UIPopoverController creates an inner shadow on the popover affecting the contentViewController of the popover. I want to remove this inner shadow, so only the content of my contentViewController is displayed. This is how the popover currently looks, with a UILabel to demonstrate the effect on the

Custom UIPopoverBackgroundView: no drop shadow

痞子三分冷 提交于 2019-12-03 05:58:38
问题 I've used this good tutorial to create a custom UIPopoverBackgroundView class. It works well. The only problem is that I am not getting the typical UIPopoverController drop shadow and I want it. I've tried specifying it on the layer of my UIPopoverBackgroundView instance without success. My instance of UIPopoverController doesn't seem to have a public view to manipulate. Adding it to the popover content also doesn't work. Probably really simple: how do I add a drop shadow when using a custom

Animate popoverContentsize when pushing navigation view controller in popover on iPad

时光总嘲笑我的痴心妄想 提交于 2019-12-03 05:22:57
How do I get my UIPopoverController to animate its size when its contained UINavigationController pushes a new controller? I have a UIPopover being displayed from a UIBarButtonItem in my iPad app. It contains a UINavigationViewController , which has a sort of settings window as its root view controller. The settings window is a subclass of UITableViewController (style set to grouped), and tapping any of its cells pushes different "chooser" view controllers on the nav controller that are also subclasses of UITableViewController . For each of the chooser views, in viewDidAppear , I'm setting

How to get reference to UIPopoverController when using adaptive segue?

[亡魂溺海] 提交于 2019-12-03 05:19:52
In my iOS 7 app, I detected if a segue was a popover via this check in prepareForSegue : if ([segue isKindOfClass:[UIStoryboardPopoverSegue class]]) But now that I am using adaptive segues, the Present as Popover segue is no longer returning true in the above check. This is because segue is no longer a UIStoryboardPopoverSegue , instead it is a UIStoryboardPopoverPresentationSegue . However, one cannot simply add the Presentation word because that's not defined. What is the appropriate way to detect when the segue is a popover from an adaptive segue , as opposed to a full screen modal

table view in popover is not scrolling

本小妞迷上赌 提交于 2019-12-03 04:56:14
I have the code below to display popover with tableview and it works perfectly. The tableview displays 13 numbers and I can scroll and see the same but when I release mouse-touch on simulator it goes back to the top. It does not stay at the row which its displaying but takes me back to 1st to 10th row . How do I make it stay in the position after scrolling. Or any fix in the below code. Thanks in Advance. - (IBAction)btn:(id)sender { if([popoverController isPopoverVisible]) { [popoverController dismissPopoverAnimated:YES]; return; } //build our custom popover view UIViewController*

How to pop from one view controller to another view controller

夙愿已清 提交于 2019-12-03 04:55:57
问题 Using iOS I Have 15 ViewControllers now I want to pop from one ViewController to another View Controller. I am using this code: SecondViewController *Sec=[SecondViewController alloc]init]; [self.navigationController popViewController:Sec animated:YES]; This shows error this ViewController not exist and then I am using this code: NSArray *array = [self.navigationController viewControllers]; [self.navigationController popToViewController:[array objectAtIndex:1] animated:YES]; This code is right