【发布时间】:2014-09-26 00:40:43
【问题描述】:
在 iOS8 中设置 UIPopoverController 大小的正确方法是什么
在 iOS7 中是
[UIPopoverController setContentViewController:(UIViewController *) animated:(BOOL)];
现在不行了
提前致谢
编辑:将我的一段代码和两个结果(iOS7.1 和 iOS8)放在这里
DetalleTarjetaVC *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"DetalleTarjetaVC"];
UINavigationController *navController;
navController = [[UINavigationController alloc] initWithRootViewController:controller];
navController.toolbarHidden = FALSE;
navController.navigationBar.translucent = FALSE;
navController.toolbar.translucent = FALSE;
navController.navigationBar.barTintColor = UIColorFromRGBWithAlpha(toolbarTintColor, 0.95);
navController.navigationBar.barStyle = UIBarStyleBlack;
navController.toolbar.barTintColor = UIColorFromRGBWithAlpha(toolbarTintColor, 0.95);
navController.toolbar.barStyle = UIBarStyleBlack;
controller.view.backgroundColor = UIColorFromRGBWithAlpha(0XFFFFFF, 1);
tarjetasPopover = [[UIPopoverController alloc] initWithContentViewController:navController];
CGRect rect = button.frame;
CGPoint coord = [button convertPoint:button.frame.origin toView:self.tableView];
rect.origin.y = coord.y -20;
[tarjetasPopover setPopoverContentSize:CGSizeMake(530, 400) animated:YES];
[tarjetasPopover presentPopoverFromRect:rect
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionLeft
animated:YES];
【问题讨论】:
标签: size ios8 xcode6 uipopovercontroller