uipopovercontroller

UIPopoverController and UIImagePickerController crash

孤街醉人 提交于 2019-12-11 08:38:19
问题 Here is the set up of my view: When the UIBarButtonItem is clicked, it should bring up a UIImagePickerController . I have to do this using a UIPopoverController , which is invoked by clicking on the "reset" button, because it is necessary on the iPad. Here is my code: -(IBAction) btnReset:(id)sender { [self chooseImage]; } -(void) chooseImage { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) { imagepicker = [[UIImagePickerController alloc]

UIPopoverController Anchor Position

依然范特西╮ 提交于 2019-12-11 06:38:37
问题 I have a UIPopOverController for which the content controller is a UINavigationController. I'm resizing the popover size according to the content size of the controller pushed/popped into it. Initally i'm presenting the popover by using the method presentPopoverFromRect:inView:permittedArrowDirections:animated: . The anchor position is pointing at the center of the rect which i passed as an argument. If i push a controller(whose content size is small) into the navigationController , the

adding image to a button in other View

自作多情 提交于 2019-12-11 06:17:46
问题 In my app i have two view controllers and have table view in both.Both table view have certain button showing certain images .Now i am trying to set a new image to a button in view B through view A using UIPopOverController.for this i created an object of class B and then done like this. [ObjB.button setImage:[UIImage imageNamed:@"1.png" forstate:UIControlStateNormal]; but i am not able to get the new image on the button.What could be the possible reason.Please help.Any help will be

stop popoverViewController resignFirstResponder after dismissed

不想你离开。 提交于 2019-12-11 05:12:57
问题 I am using a uitableview containing multiple rows, and each row contains two UITextFields side by side. let's say TextField1, TextField2. When a user taped on TextField1, and start typing, a popoverViewController shows up for suggestions. When the user tap on a suggestion from the popoverViewController, the popover dismissed (this is what i want), then the keyboard dismissed as well (this is not what i want). if now the user tap on TextField2, the keyboard comes up. I want to keep the

UISplitViewController - Show popover for master view on viewDidLoad

牧云@^-^@ 提交于 2019-12-11 03:40:18
问题 Is it possible to show master view in popover on viewDidLoad (when the view is in portrait orientation)? 回答1: Solution 1: [self.popoverButtonItem.target performSelector: self.popoverButtonItem.action withObject: self.popoverButtonItem]; Solution 2: [self.popoverController presentPopoverFromBarButtonItem:toolbarButtonItem permittedArrowDirections:UIPopoverArrowDirectionAny animated:NO]; But the trick is when to use these statements. I had to use a flag for this purpose, in order to show the

Can I change the UIPopover animation anchor point?

假装没事ソ 提交于 2019-12-11 02:32:07
问题 I'm attempting to achieve a "drop down" menu effect with a UIPopover. When I change the height from 0px to 500px it appears to stretch 250px up and 250px down... essentially anchoring the UIPopover at the original spawn point on center. I would like the anchor to be the top of the popover, so that when I adjust the size it is the bottom of the window that animates downwards. I've noticed this happens automatically if you move the UIPopover to the top the screen. But how can I achieve the same

Change pop-over contentsize using navigationcontroller

限于喜欢 提交于 2019-12-10 18:32:57
问题 I want to show a popover with a custom contentsize. I can do it doing like so UINavigationController* popoverContent = [[UINavigationController alloc] init]; UIView* popoverView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 800, 800)]; popoverView.backgroundColor = [UIColor blueColor]; popoverContent.view = popoverView; popoverContent.contentSizeForViewInPopover = CGSizeMake(55, 55); UIPopoverController *pop = [[UIPopoverController alloc] initWithContentViewController:popoverContent]; [pop

How to show/hide UIPopoverController using a single button with a single action method

六月ゝ 毕业季﹏ 提交于 2019-12-10 17:52:59
问题 The following method is associated with a nav bar button. When the button is pressed, it shows a UIPopoverController - (IBAction) showTablePopUp:(id) sender { if (self.tablesPopoverController == nil) { TablesPopOverViewController *tables = [[TablesPopOverViewController alloc]initWithNibName:@"TablesPopOverViewController" bundle:[NSBundle mainBundle]]; UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:tables]; popover.delegate = self; popover

presentPopoverFromRect not displaying popover in iOS8 beta

让人想犯罪 __ 提交于 2019-12-10 17:32:37
问题 I am migrating an iOS7.1 iPad app to iOS8. I just downloaded Xcode 6 Beta, and ran the application on a simulator. First thing I notice is the popovers which worked fine in iOS7.1 don't work anymore. The way I an creating the popover is: // the popover controller UIPopoverController *popOverController; // the content to be shown in the popover DropdownViewController dropdownVC = [self.navigationController.storyboard instantiateViewControllerWithIdentifier:@"DropdownViewController"]; //

UIImagePickerController in an existing UIPopoverController

独自空忆成欢 提交于 2019-12-10 14:49:14
问题 Is there a way to push the UIImagePickerController in an existing UIPopoverController's navigation controller? What I know is that you have to create a new popover and add the UIImagePickerController in it. But I have an existing popover with its navigation controller that should present the image picker. 回答1: Use setContentViewController:animated: on UIPopoverController 回答2: I believe the answer is no because the image picker brings its own navigation controller. And nesting two nav