uipopovercontroller

UIPopoverController automatically resizing to max height on pushViewController

时光毁灭记忆、已成空白 提交于 2019-11-28 03:03:37
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 animated:YES]; This is when the problem occurs: after pushing the new view the popover resizes to the

Code is exectuting but the view is not loading when called form a function?

浪尽此生 提交于 2019-11-28 01:42:08
I am doing a book kinda application using a viewBased application. The mainView acts as the backgroundView for loading pages. Each page is a different view and have its own nib. When i swipe on a page(actually on the mainView which have loaded the current view/page), that page will be removed and the next/previous page will be added. [currentPage.view removeFromSuperview]; [self.view insertSubview:nextPage.view atIndex:0]; I have added a popoverController with a barbutton in this mainView. Its intialized with a tableviewController class named popClass. PopClass is another UITableViewController

Transparent UIPopover

余生长醉 提交于 2019-11-28 00:12:10
Is there a way to make the UIPopOver transparent (alpha = 0.75 or so). Unfortunately there is no alpha property for UIPopOver. I need to present a popover so that the view beneath it will still be partially visible. Any ideas popoverController.contentViewController.view.alpha = 0.5; alpha is an property of an UIView so you need to get the view of the popOver and then set the alpha to that view. Starting with iOS5.0, one can provide a custom background for the UIPopoverController . That background has to be derived from UIPopoverBackgroundView which does provide the normal UIView properties

how to center a popoverview in swift

核能气质少年 提交于 2019-11-27 18:07:48
I have the following code to show a popoverview (dialog) without an arrow, which works fine. The only problem is, that the dialog is shown in the top left (IPad). I would like to center the view on the screen. What to change or add in my following code ? : func show_help(){ let storyboard = UIStoryboard(name: "Main", bundle: nil) let controller = storyboard.instantiateViewControllerWithIdentifier("Help") as! UIViewController controller.modalPresentationStyle = UIModalPresentationStyle.popover let popoverPresentationController = controller.popoverPresentationController // result is an optional

UIPopovercontroller dealloc reached while popover is still visible

吃可爱长大的小学妹 提交于 2019-11-27 17:16:20
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:picker]; [poc presentPopoverFromBarButtonItem:bbItem permittedArrowDirections:UIPopoverArrowDirectionAny

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

穿精又带淫゛_ 提交于 2019-11-27 13:12:32
问题 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

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

大兔子大兔子 提交于 2019-11-27 12:02:41
问题 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)? 回答1: I was faced

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

两盒软妹~` 提交于 2019-11-27 11:41:01
问题 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

How to correctly present a popover from a UITableViewCell with UIPopoverArrowDirectionRight or UIPopoverArrowDirectionLeft

老子叫甜甜 提交于 2019-11-27 11:40:55
I always try to present a popover from a cell inside a tableView this way: [myPopover presentPopoverFromRect:cell.frame inView:self.tableView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; but I cannot use UIPopoverArrowDirectionRight or Left, because, depending on the position of the ipad (portrait or landscape), the popover appears someplace else. Am I presenting the popover the right way? PS: the table view is in the detailView of a splitView. vrk Here is the simple solution which works fine for me - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:

How can I fix the “UIPopoverController is deprecated” warning?

 ̄綄美尐妖づ 提交于 2019-11-27 11:33:14
I am using this code: mediaLibraryPopover = [[UIPopoverController alloc] initWithContentViewController:avc]; [self.mediaLibraryPopover presentPopoverFromRect:[theButton bounds] inView:theButton permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; And I am getting this warning in Xcode 7: UIPopoverController is deprecated, first deprecated in iOS 9.0 - UIPopoverController is deprecated. Popovers are now implemented as UIViewController presentations. Use a modal presentation style of UIModalPresentationPopover and UIPopoverPresentationController. You no longer need