草庐IT

popOverController

全部标签

iphone - UIImagePickerController ios 5 在 ipad 中使用 UIPopoverController 选择图像时出现问题

我在ios5的ipad中从UIImagePickerController选择图像时遇到问题。相同的代码在ios4中完美运行。那么问题是什么?任何人都可以帮助我如何在ios5中使用UIImagePickerController吗?ios4和ios5的UIImagePickerController有什么区别吗?下面是问题的代码。-(IBAction)selectExitingPicture:(id)sender{if([popoverControllerisPopoverVisible]){[popoverControllerdismissPopoverAnimated:YES];[pop

ios - 点击 UITextField iPad 后 UIPopover 中的 datePicker

我想在iPad上创建UIPopover,点击UITextField后,其中有一个UIDatePicker。我使用下面的代码来这样做,但我不知道tempButton.frame代表什么或者tempButton是什么。是否可以使用Storyboard来做同样的事情?提前致谢。UIViewController*popoverContent=[[UIViewControlleralloc]init];//ViewControllerUIView*popoverView=[[UIViewalloc]init];//viewpopoverView.backgroundColor=[UIColorb

ios - 无法从没有窗口的 View 中显示弹出窗口 - presentPopoverFromBarButtonItem

我试图在点击UIBarButtonItem时显示一个UIPopover。我收到此错误:***Terminatingappduetouncaughtexception'NSInvalidArgumentException',reason:'-[UIPopoverControllerpresentPopoverFromBarButtonItem:permittedArrowDirections:animated:]:Popoverscannotbepresentedfromaviewwhichdoesnothaveawindow.'这是我的代码:Pop*controller;UIPopov

ios - 如何使用 iOS 状态恢复来恢复 UIPopoverController?

在我的一个应用程序中,我实现了staterestoration目前正在开发iPad版本。在iPad版本中,我使用UIPopoverController来显示ViewController,但我无法找到应该如何保存和恢复这些弹出窗口Controller。UIPopoverController不继承自UIViewController因此没有restorationIdentifier和restorationClass属性我可以利用。我是否负责保存弹出Controller的targetRect并在我的主视图Controller中手动编码它的contentViewController以便我可以在它

ios - 在以 Navigationcontroller 为 View 的 Popovercontroller 中更改 navigationBar 和 toolBar 的色调

我有一个UINavigationController作为我的UIPopoverController的主视图。我想更改导航栏和工具栏的色调,但似乎无法正常工作。谁能指出我正确的方向?这是我现有的无效代码。其中ColorScheme=[UIColorcolorWithRed:0.228green:0.307blue:0.492alpha:1.000]这是NSLOG语句的结果:配色方案=UIDeviceRGBColorSpace0.2280.3070.4921self.navController=[[UINavigationControlleralloc]initWithRootViewCo

ios - 我如何观察 UIPopoverController 何时被解除?

UISplitViewController有委托(delegate)方法:-(void)splitViewController:(UISplitViewController*)svcpopoverController:(UIPopoverController*)pcwillPresentViewController:(UIViewController*)aViewController我希望从类似但不存在的委托(delegate)方法中获取功能:-(void)splitViewController:(UISplitViewController*)svcpopoverController:

ios - 弹出窗口中的 uiBarButtonItem 框架最佳选择

我已经在Storyboard上拖放了一个barButtonItem并且一直在使用这个popover代码但是[popoverControllerpresentPopoverFromRect:self.barButonItem.frameinView:self.viewpermittedArrowDirections:UIPopoverArrowDirectionUpanimated:YES];barButtonItem.frame不起作用,因为没有可用的框架属性。让它完美运行的最佳替代方案是什么?提前致谢。目前我正在使用这个代码:我正在使用这个方法:-(IBAction)buttonCl

ios - iPad:点击导航栏中的按钮时关闭弹出窗口

我有一个包含多个按钮的导航栏,包括后退按钮、编辑按钮和打开弹出框的按钮。当弹出窗口打开并且用户点击任何其他按钮时,我希望弹出窗口关闭。我可以尝试检测所有按钮上的每一次点击,并在弹出窗口打开时拦截操作,但我认为可能有更优雅的选择。它适用于点击所有不在导航栏内的项目,只有导航栏中的按钮不会关闭弹出框。有什么建议吗?我的问题与UIPopoverControllerdoesnotdismisswhenclickingontheNavigationBar非常相似但我似乎没有办法问作者是否解决了问题。 最佳答案 我知道这可能有点晚了,但对其他人

iphone - 如何关闭 UIPopoverController?

我创建了一个UIPopoverController并在单击UIButton时将其添加到ViewController,如下所示-(void)viewDidLoad{[superviewDidLoad];controller=[[SecondViewControlleralloc]initWithNibName:@"SecondViewController"bundle:[NSBundlemainBundle]];popoverController=[[UIPopoverControlleralloc]initWithContentViewController:controller];}-

ios - 为什么 presentationController 不是 :viewControllerForAdaptivePresentationStyle: being called?

我正在尝试通过自适应弹出窗口以编程方式呈现View(例如,在iPad上的弹出窗口中,在iPhone上全屏显示)。为了能够关闭iPhone上呈现的ViewController,我尝试将其包装在导航Controller中,如https://stackoverflow.com/a/29956631/5061277所示。或者这里的好例子:https://github.com/shinobicontrols/iOS8-day-by-day/tree/master/21-alerts-and-popovers/AppAlert,看起来像:importUIKitclassViewController
12