uipopovercontroller

prepareForSegue is not called after performSegue:withIdentifier: with popover style

核能气质少年 提交于 2019-11-27 01:25:25
问题 I have a universal app, where I am sharing the same controller for a IPad and IPhone storyboard. I have put a UILongPressGestureRecognizer on a UITableView, that when a cell is pressed on iPhone it calls an action that perform a segue: -(IBAction)showDetail:(id)sender { UILongPressGestureRecognizer *gesture = (UILongPressGestureRecognizer*)sender; if (gesture.state == UIGestureRecognizerStateBegan) { CGPoint p = [gesture locationInView:self.theTableView]; NSIndexPath *indexPath = [self

UIDatePicker in UIPopover

不羁岁月 提交于 2019-11-27 01:12:12
I have searched the entire internet (maybe I am exaggerating a little) for a tutorial on how to put a DatePicker into a UIPopover and display that in an iPad application. I have tried creating a viewcontroller, placing the datepicker in the view controller and then: self.popover = [[UIPopoverController alloc] initWithContentViewController:sa]; (sa is the name of the viewcontroller i created), but this doesn't work, and the app crashes. Can anyone help? Try with below code. It will work fine: Objective-C - (IBAction)showDatePicker:(UIButton *)sender { UIDatePicker *datePicker = [[UIDatePicker

Retain/release pattern for UIPopoverController, UIActionSheet, and modal view controllers?

喜欢而已 提交于 2019-11-27 01:09:45
问题 I'm somewhat unclear on the object ownership patterns required for the following instances. When my UIViewController presents a popover controller, an action sheet, or another view controller as modal, am I required to hang onto a retained reference to that child controller until it's been dismissed? In other words, do the following lines of code effectively "transfer" ownership, or not? [aPopoverController presentPopoverFromBarButtonItem:someButtonItem permittedArrowDirections

UIPopover without any arrows

荒凉一梦 提交于 2019-11-27 00:33:52
问题 Is it possible to present a popover without any sort of arrows pointing somewhere? 回答1: Yes it is possible just do: [self.popoverController presentPopoverFromBarButtonItem:anItem permittedArrowDirections:0 animated:YES]; The zero represent no direction. 回答2: For iPhone and swift 2.0 try this one Code to initiate popover initiatePopover(){ let popoverContent = self.storyboard?.instantiateViewControllerWithIdentifier("XYZController") as! XYZController let nav = UINavigationController

UIPopoverController automatically resizing to max height on pushViewController

北慕城南 提交于 2019-11-26 23:55:46
问题 I have a popover containing a UINavigationController. I can display the popover fine, and it contains the navController just fine. The navController contains a tableView and when I select an item it creates a new detail view: DeviceDetailViewController *detailViewController = [[[DeviceDetailViewController alloc] initWithNibName:@"DeviceDetailViewController" bundle:nil] autorelease]; I then push it the new view controller: [self.navigationController pushViewController:detailViewController

UIPopovercontroller dealloc reached while popover is still visible

倾然丶 夕夏残阳落幕 提交于 2019-11-26 22:32:12
问题 I assure you that I did look for an answer in SO for my question but none of them were helpful. Here I got a simple code that should present a UIImagePickerController within a UIPopoverController : -(void)takePicture:(id)sender{ UIImagePickerController *picker=[[UIImagePickerController alloc] init]; picker.delegate=self; picker.sourceType=UIImagePickerControllerSourceTypeCamera; picker.allowsEditing=YES; UIPopoverController *poc=[[UIPopoverController alloc] initWithContentViewController

How to customize / style a UIPopoverController

▼魔方 西西 提交于 2019-11-26 21:54:31
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 Andrew This is possible starting in iOS 5.0 by subclassing the abstract class UIPopoverBackgroundView and assigning your subclass to the popoverBackgroundViewClass property on your UIPopoverController instance. Unfortunately there is no tintColor property as the popover needs to use images for it's

iPhone popup menu like iPad popover?

五迷三道 提交于 2019-11-26 18:41:56
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 Have a look at the iPhone UIPopoverController implementation: WEPopover Suragch 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 popover to be and add any content that you want it to have. For my example I just added a UILabel . If you

UIPopoverController for iphone not working?

a 夏天 提交于 2019-11-26 17:26:44
问题 I need to use a UIPopOverController for my iPhone app ,i searched stackoverflow someone said UIPopoverController does not run on iphone iphone device WHY?.when i run on iphone device i got this error reason: '-[UIPopoverController initWithContentViewController:] called when not running under UIUserInterfaceIdiomPad.' -(void)btnSetRemainderTapped:(UIButton *)button { setReminderView =[[SetRemainderView alloc]initWithNibName:@"SetRemainderView" bundle:[NSBundle mainBundle]]; setReminderView

change color navigation controller in a popover

耗尽温柔 提交于 2019-11-26 16:56:23
问题 I'm having a problem with trying to change the colour of my navigation controller inside my popoverController. I'm trying to do something like this: if (self.popoverController == nil) { ArtistsViewController *artistsViewController = [[ArtistsViewController alloc] initWithNibName:@"ArtistsViewController" bundle:[NSBundle mainBundle]]; artistsViewController.navigationItem.title = @"Artists"; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController