uipopovercontroller

Change Action sheet popover arrow in iOS8

三世轮回 提交于 2019-12-03 04:43:47
i'm using UIAlertController . But on iPad with iOS 8, actionSheet show with popover arrow. Any ideas to hide that arrow? Here is my code: UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"this is alert controller" message:@"yeah" preferredStyle:UIAlertControllerStyleActionSheet]; UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel action") style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) { NSLog(@"Cancel action"); }]; UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @

Safari-style UIPopoverController from Toolbar

自闭症网瘾萝莉.ら 提交于 2019-12-03 03:44:43
I'm creating an iPad application which needs a UIPopoverController like this one (I mean, with buttons): I tried using a UIViewController but it gives me an enormous popup with a white background. Can anyone explain me how to make one? I cannot find any documentation or example code. Thanks. You need -[UIActionSheet showFromBarButtonItem:animated:] instead of a UIPopoverController. 来源: https://stackoverflow.com/questions/2579025/safari-style-uipopovercontroller-from-toolbar

UISearchDisplayController automatically creates a UIPopovercontroller to display content search result ?! How to dismiss it?

↘锁芯ラ 提交于 2019-12-03 03:33:06
I'm using a UISearchDisplayController with a UISearchBar. I put this UISearchBar in my app using IB and I get : alt text http://img6.imageshack.us/img6/1985/screenshot20100701at156.png Fine : when you start taping, the result popovercontroller appears magically (I didn't write anything on my own to make it appear !) Then, when a row is clicked among the result, I want to dismiss the PopoverController BUT at this stage, I never instantiated the UIPopoverController on my side : it looks like if there's an encapsulated behavior in the UISearchDisplayController that automatically wraps its

in iOS8: UIPopoverController presentPopoverFromRect not work for keyWindow any more

时光毁灭记忆、已成空白 提交于 2019-12-03 02:56:23
As titled, in iOS8, [UIPopoverController presentPopoverFromRect] does not work for [UIApplication sharedApplication].keyWindow any more. (It does work in iOS7) I verified following codes: TestViewController *test = [[TestViewController alloc] initWithNibName:nil bundle:nil]; if (testPopoverController == nil) { testPopoverController = [[UIPopoverController alloc] initWithContentViewController:test]; testPopoverController.popoverContentSize = CGSizeMake(250, 95*5); } CGPoint point = [sender convertPoint:CGPointMake(0, 0) toView:nil]; CGRect rect = CGRectMake(point.x, point.y, 24, 24);

Unpredictable delay before UIPopoverController appears under iOS 8.1

南楼画角 提交于 2019-12-03 01:57:37
This problem happens with SDK 8.1, when running under iOS 8.1, but not when running under iOS 7. It is for iPad only. The problem appears both with simulator and on a hardware device. The code below demonstrates a view controller that contains a UITableView with 1 row, and below that, a UIButton. Tapping on the button or on the row will cause a popover to appear. This works just fine when tapping the button, but when tapping the row of the tableview, the popover appears with some delay. In my testing, first time I tap the row the popover usually appears with little or no delay, but second time

UIPopOver and orientation change

耗尽温柔 提交于 2019-12-03 01:08:01
In my app I have 3 UIPopOvers. They appear when user taps buttons in the toolbar. I need to make the popovers appear in the correct place when user rotates iPad if the popover is already opened (like the -willAnimateRotationToInterfaceOrientation:). How can I do it? Thanks in advance! In iOS 7.0 and later, it can be done by implementing following method available in UIPopoverControllerDelegate : (void)popoverController:(UIPopoverController *)popoverController willRepositionPopoverToRect:(inout CGRect *)rect inView:(inout UIView **)view For popovers that were presented using the

Remove the inner shadow that UIPopoverController creates

孤街浪徒 提交于 2019-12-02 21:35:41
I am creating a custom layout of the popover that iOS provides. I have subclassed the UIPopoverBackgroundView and got it to draw the background for my popover correctly. My problem is now that UIPopoverController creates an inner shadow on the popover affecting the contentViewController of the popover. I want to remove this inner shadow, so only the content of my contentViewController is displayed. This is how the popover currently looks, with a UILabel to demonstrate the effect on the contentViewController. Is there any way to remove this inner shadow? Support for this was added in ios6.0

How to pop from one view controller to another view controller

女生的网名这么多〃 提交于 2019-12-02 18:12:29
Using iOS I Have 15 ViewControllers now I want to pop from one ViewController to another View Controller. I am using this code: SecondViewController *Sec=[SecondViewController alloc]init]; [self.navigationController popViewController:Sec animated:YES]; This shows error this ViewController not exist and then I am using this code: NSArray *array = [self.navigationController viewControllers]; [self.navigationController popToViewController:[array objectAtIndex:1] animated:YES]; This code is right to pop from thirdViewController to secondViewController. But What happened when we pop from Ninth(9th

How to make UIPopoverController keep same position after rotating?

佐手、 提交于 2019-12-02 15:55:08
I can't keep popover the same position on the screen after rotation. Is there any good way to do that, because just setting some frame to popover works terrible after rotating. popover.frame = CGRectMake(someFrame); After rotation popover looks fine only if it is in the center of the screen. Max MacLeod Apple has a Q&A on exactly this issue. You can find the details here: Technical Q&A QA1694 Handling Popover Controllers During Orientation Changes Basically, the technique explains that in your view controller's didRotateFromInterfaceOrientation method, you will present the pop over again as

popoverviewController crash on iPhone, works on iPad

↘锁芯ラ 提交于 2019-12-02 12:59:20
问题 a noob question here: any ideas why this code: UIViewController* popoverviewController = [[UIViewController alloc]init]; UIView* popoverView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; [webViewnetwork loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"webView" ofType:@"html"]isDirectory:NO]]]; [popoverView addSubview:webViewnetwork]; popoverviewController.view = popoverView; popoverviewController