uipopovercontroller

iOS 8 presentationController determine if really is popover

坚强是说给别人听的谎言 提交于 2019-11-29 01:27:00
I'm using the new adaptive "Present As Popover" capability of iOS 8. I wired up a simple segue in the StoryBoard to do the presentation. It works great on an iPhone 6 Plus as it presents the view as a popover and on an iPhone 4s it shows as a full screen view (sheet style). The problem is when shown as a full screen view, I need to add a "Done" button to the view so dismissViewControllerAnimated can be called. And I don't want to show the "done" button when it's shown as a popover. I tried looking at the properties of both presentationController and popoverPresentationController, and I can

Show modal view controller with custom frame in iPad

夙愿已清 提交于 2019-11-28 21:43:48
问题 I want to show a modal UIViewController with a custom frame in iPad, centered on top of its parent view controller. I tried using a form sheet but as far I know the frame and shadow effect can't be changed. vc.modalPresentationStyle = UIModalPresentationFormSheet; [self presentModalViewController:cv animated:YES]; I also tried using a popover but as far as I know either I can't center it or I can't hide the arrow. Is there another way to show modal view controllers? Is it possible to solve

Dismissing iPad UIPopoverController when BarButtonItem is pushed while it's open

坚强是说给别人听的谎言 提交于 2019-11-28 20:48:24
Using a split view on the iPad, I have the following code: - (void) splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)pc { barButtonItem.title = @"Categories"; NSMutableArray *items = [[toolbar items] mutableCopy]; [items insertObject:barButtonItem atIndex:0]; [toolbar setItems:items animated:YES]; [items release]; self.popoverController = pc; } This works well to show the popover when the button is pressed. However, I'd also like to have the

UIAlertController is Crashed (iPad)

柔情痞子 提交于 2019-11-28 20:16:41
I am using Xcode 6 to develop an iOS Application. When I used UIAlertController , it can be worked well on iPhone 6 simulator, but crashes on iPad simulator. My problem while clicking "share", then it could be crashed. How could I solve it? Here is my Code: override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [AnyObject] { var shareAction = UITableViewRowAction(style: UITableViewRowActionStyle.Default, title: "Share", handler: { (action:UITableViewRowAction!, indexPath:NSIndexPath!) -> Void in let shareMenu = UIAlertController(title: nil,

Is it possible to perform a Popover Segue manually (from dynamic UITableView cell)?

混江龙づ霸主 提交于 2019-11-28 19:11:29
I need to perform a Popover segue when user touches a cell in a dynamic TableView. But when I try to do this with this code: - (void)tableView:(UITableView *)tableview didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self performSegueWithIdentifier:@"toThePopover" sender:[tableView cellForRowAtIndexPath]]; //... } than I get an error: Illegal Configuration Popover segue with no anchor Is there any way to do this (to perform a popover segue from dynamic TableView manually)? I was faced with this same issue tonight, there a couple workarounds (including presenting the popover the old

Symbol not found: _OBJC_CLASS_$_UIPopoverController

亡梦爱人 提交于 2019-11-28 18:50:32
I am having problems with my universal app. I have set the Base SDK to iPhone 3.2 and set the target to 3.1. I have moved the files that are using the UIPopoverController to their own files and they shouldn't be loaded when loading the app on the iPhone. Still, when I build my app I get the following error when I build and debug to my device: dyld: Symbol not found: _OBJC_CLASS_$_UIPopoverController Referenced from: /var/mobile/Applications/B3B90643-92DC-4E5C-8B2F-83A42D6D57E0/citybikes.app/citybikes Expected in: /System/Library/Frameworks/UIKit.framework/UIKit in /var/mobile/Applications

UIPopover How do I make a popover with buttons like this?

喜夏-厌秋 提交于 2019-11-28 18:48:18
I'm wondering how I can create a popover with buttons like this. ANSWER: UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle: nil delegate: self cancelButtonTitle: nil destructiveButtonTitle: nil otherButtonTitles: @"Take Photo", @"Choose Existing Photo", nil]; [actionSheet showFromRect: button.frame inView: button.superview animated: YES]; Somewhere else in your delegated object class... -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == 0) { // take photo... } else if (buttonIndex == 1) { // choose existing photo...

Drag-n-Drop from UIPopoverController to other UIView

谁说我不能喝 提交于 2019-11-28 18:29:51
How would I go about implementing dragging and dropping a UIView from UIPopoverController into the back UIView . This is the functionality that Pages provide in their insert media popover, where you can drag a shape out from the UIPopoverController and drop it into the main document. I am actually confused with the pan UIGestureRecognizers and where they will be implemented. Thanks, Umer You have to deal with two view controllers one that's in the background called mainController one that presented using a UIPopoverViewController called popoverController. Your popoverController could add a

How to implement UIVisualEffectView in UITableView with adaptive segues

蹲街弑〆低调 提交于 2019-11-28 16:43:07
I would like to implement UIVisualEffectView to apply a blur effect to a view to show the view that lies behind it. This view that should have its background blurred is a UITableViewController that is embedded in a UINavigationController , and it will either be presented in a popover on iPad or it will be presented full screen modally on iPhone, thanks to iOS 8 adaptive segues (Present as Popover). When this view controller is in a popover I want the background to blur what's underneath the popover, and when it's presented full screen I want the background to blur the previous view controller.

change the bordercolor of UIPopOverController

会有一股神秘感。 提交于 2019-11-28 12:04:06
问题 Is it possible to change the default black like color of the UIPopOver to some another color? 回答1: No its default behavior we cant change it 回答2: Accepted answer was wrong.. see this http://blog.teamtreehouse.com/customizing-the-design-of-uipopovercontroller 来源: https://stackoverflow.com/questions/3399861/change-the-bordercolor-of-uipopovercontroller