uipopovercontroller

Set UIPopOverController size

时间秒杀一切 提交于 2020-01-13 10:43:16
问题 I have a view with a bunch of button in a UIScrollView . When the user presses a button, I want a UIPopOverController to display pointing at the selected button. It kind of works, but the popover is the wrong size and points to a random point in the view. Here is my code. -(void)detail:(id)sender{ UIButton *button = sender; NSLog(@"tag = %i", button.tag); UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewController]; if (UI_USER_INTERFACE

detect when UIPopoverController has finished presented UIImageViewcontroller

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-11 09:57:06
问题 I have the UIImagePickerController as a content View Controller for the UIPopoverController. I need to detect when the popover has just finished presented (has just showed up). UIPopoverController does not have any delegate for this. I can't seem to find a way to detect the UIImagePickerController as well. (This is for iPad) Any suggestions? // UIImagePickerController let's the user choose an image. UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker

How to implement UIVisualEffectView in UITableView with adaptive segues

老子叫甜甜 提交于 2020-01-09 12:26:08
问题 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 doesn't display on iphone

前提是你 提交于 2020-01-07 07:25:12
问题 I followed this UIPopoverPresentationController on iPhone doesn't produce popover but doesn't produce popover on iphone. Here is the code of viewcontroller class ViewController:UIViewController,UIPopoverPresentationControllerDelegate{ override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "second"{ let secondVC = segue.destination let controller :

crash on showing UIPopOverPresentationController

旧城冷巷雨未停 提交于 2020-01-06 07:43:23
问题 *** Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController (<_UIAlertControllerActionSheetRegularPresentationController: 0x1a56bd90>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.' 回答1: self.dismissViewControllerAnimated(true, completion: nil) let textToShare:String = "Lets have a chat!"; let activityVC:UIActivityViewController = UIActivityViewController(activityItems: [textToShare],

Popover and tableview transparent

泪湿孤枕 提交于 2020-01-04 05:59:49
问题 In my Ipad application I use a popover but I'm not able to make it transparent. The popover has a tableview inside; my code is: UIViewController* popoverContent = [[UIViewController alloc] init]; UIView* popoverView = [[UIView alloc] initWithFrame:CGRectMake(600, 800, 100, 100)]; popoverView.backgroundColor = [UIColor greenColor]; popoverContent.view = zoneViewController.view; self.popoverController = [[UIPopoverController alloc] initWithContentViewController:popoverContent]; [self

UIPopoverController altering location of UIPopoverArrowDirection

天涯浪子 提交于 2020-01-03 15:17:49
问题 I want to move the UIPopoverArrowDirection to the left such that the actual arrow is no longer centered but more 25% from the left and 75% from the right. To help understand what I mean see the two screen shots I want it to be like the second one... The problem is that there is no real way to dig down into the popover class... 回答1: This is already doable with the builtin class by specifing "presentPopoverFromRect" and making that rect constrained enough. The below is code taken straight out

Weak linking UIPopoverBackgroundView

邮差的信 提交于 2020-01-03 04:30:13
问题 I have a project that has to be deployed to 4.0 but has some features that are 5.0 only, such as UI customization. I want my UIPopoverBackgroundView subclass to be weak linked, but I always get the following error when launching on 4.X devices dyld: Symbol not found: _OBJC_CLASS_$_UIPopoverBackgroundView I can't use the NS_CLASS_AVAILABLE macro since my custom Background of the popover is a subclass of the UIPopoverBackgroundView class, so it has to be declared in a .h . How can I weak link

IOS: fill a popover with a tableview

拥有回忆 提交于 2020-01-03 02:43:31
问题 How can I create a popover and fill it with a tableview? I have a button on a toolbar in bottom of my view, and when i push this button I want to show this popover 回答1: Create pushviewcontroller and in the pushviewcontroller you have to give the tableview. like this. UIViewController *myPopOver = [[UIViewController alloc] initWithNibName:@"MyPopOverView" bundle:nil]; //(asper your requirement take thiscontroller as tableview) popoverController = [[[UIPopoverController alloc]

Strange Error With UIPopoverController

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-03 02:23:27
问题 I'm trying to use UIImagePickerController to grab a photo from the users Photos on their iPhone / iPad. This code works just fine for iPhone, but when I run it on iPad, the debugger gives me the message "Terminating app due to uncaught exception 'NSGenericException', reason: '-[UIPopoverController dealloc] reached while popover is still visible.". I'm very new to Objective-C, so I'm unsure of whats causing this, I do not dealloc anything and I have ARC turned on. Here is my code: