Tag: 模式对话框

iOS – 编程模式与animation(例如翻转)

我知道我可以在这样的代码中做一个模态: [presentModalViewController:my_view, animated:YES]; 但我怎样才能以编程方式指定淡入或水平/垂直翻转? 谢谢,Pachun

presentModalViewController什么都不做

我有一个UIViewController( 父 )调用presentModalViewController与另一个UIViewController( 子 ) viewDidLoad 。 如果父级没有UINavigationController,那么presentModalViewController什么也不做。 如果它有一个UINavigationController,则presentModalViewController按预期显示子项 。 这是presentModalViewController的标准行为还是有其他的东西在这里玩?

iOS 6:旋转后忽略父模态的modalPresentationStyle

使用iOS6的iPad,我们有一个模式视图控制器将扩展到全屏的错误,即使它被告知使用“表单”演示文稿样式。 但是,这只有在有两个模态,一个父模态和一个子模态时才会发生。 所以这是如何创build和呈现第一个模式: UINavigationController *navigationController = [[[UINavigationController alloc] initWithRootViewController:controller] autorelease]; navigationController.modalPresentationStyle = UIModalPresentationFormSheet; [parentController presentModalViewController:navigationController animated:YES]; // parentController is my application's root controller 这是如何创build和呈现孩子模态: UINavigationController *navigationController = [[[UINavigationController alloc] initWithRootViewController:controller] autorelease]; navigationController.modalPresentationStyle = UIModalPresentationFormSheet; [parentController presentModalViewController:navigationController animated:YES]; // parentController is the navigationController from above 所以当从横向旋转到纵向时,即使我们旋转回风景,父模式也会扩展到全屏模式。 当我们拥有父模态本身(没有子模态)时,它就像预期的那样工作,这就是它仍然是表单样式。 请注意,这仅在iOS6(设备和模拟器)上发生,并且不会在iOS 5(模拟器上发生并由testing人员报告工作)发生。 到目前为止,我已经尝试了以下成功: 将wantsFullScreenLayout设置为NO 强制wantsFullScreenLayout总是通过覆盖它返回NO 确定我的控制器内的导航控制器也指定UIModalPresentationFormSheet 实现preferredInterfaceOrientationForPresentation 升级到iOS 6.0.1 […]

popup/模式select器的IOS7中的文本字段

我很难搞清楚如何实现一个标准的popup式选取器。 与用户select生日文本字段ID(如popup式选取器)出现时的许多应用程序注册屏幕一样,用户可以select其生日,单击“完成”,格式化的date将添加到文本字段中。 这似乎不应该是所有的困难,但似乎没有简单,清晰,标准的方式做到这一点在ios7。 我搜查了互联网,看到有人说使用模态,其他人说动作表,其他人说popup窗口,还有人说,一个单独的视图controller.Can任何人都可以告诉我这样做的标准方式和/或提供一个啧啧的链接或如何实施它的一个片段?

如何将closuresbutton添加到UIModalPresentationPageSheet中提供的模态视图angular?

我想添加一个浮动closures(x)button在UIModalPresentationPageSheet视图的angular落。 效果如下: 但是,将其添加到父视图使其出现在页面页面(也不可能点击),并将其添加到页面页面将隐藏它的一部分,因为它不在视图区域中。 有没有更好的解决scheme? 任何build议表示赞赏。

如何快速将popoverview居中

我有下面的代码来显示一个没有箭头的popoverview(对话框),这工作正常。 唯一的问题是,对话框显示在左上方(IPad)。 我想将视图集中在屏幕上。 什么更改或添加在我的下面的代码? : func show_help(){ let storyboard = UIStoryboard(name: "Main", bundle: nil) let controller = storyboard.instantiateViewControllerWithIdentifier("Help") as! UIViewController controller.modalPresentationStyle = UIModalPresentationStyle.Popover let popoverPresentationController = controller.popoverPresentationController // result is an optional (but should not be nil if modalPresentationStyle is popover) if let _popoverPresentationController = popoverPresentationController { // set the view from which to pop […]

不调用呈现视图控制器的dismissModalViewControllerAnimated:方法的模式视图控制器

在我的模式视图控制器,我有一个button处理方法,其中包括 [self dismissModalViewControllerAnimated: YES]; 在呈现视图控制器我重写dismissModalViewControllerAnimated:如下所示: -(void) dismissModalViewControllerAnimated: (BOOL)animated { NSLog(@"dismiss"); [super dismissModalViewControllerAnimated: animated]; } 当button被触摸时,button处理方法被调用,但dismissModalViewControllerAnimated:覆盖似乎并没有被调用:NSLog(@“dismiss”); 语句不被调用,并且方法内部的断点不会被打中。 我试过了 [[self presentingViewController] dismissModalViewControllerAnimated: YES]; 但是这也不起作用。 但是,模态视图控制器不会被解雇。 任何想法可能会出错?

消除UIScrollView底层的模态视图更改

必须有一些基本的东西,我在这里失踪。 我有一个UIScrollView打开,这是由客户UIScrollViewController(称为DataController)控制。 在某个时间点,需要用户input,所以我从DataController打开一个模态UIViewController: ElementSelectController *viewController = [[ElementSelectController alloc] initWithNibName:@"ElementSelectController" bundle:nil]; viewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; viewController.theDelegate = self; [self presentModalViewController:viewController animated:YES]; 一旦用户准备好模态视图,它将被再次解散。 这也发生在DataController上: [self dismissModalViewControllerAnimated:YES]; 这一切工作正常。 但是,当模态视图消失,事实certificate,底层的UIScrollView被调整到全屏,并滚动到位置(0,0)。 即使有一个简单的模态观点,这种情况也是如此,除此之外别无他法。 显然,我希望UIScrollView保持与模态视图出现前相同的状态和大小。 任何想法我做错了什么? 我检查了UIScrollView框架设置(通过setFrame中的一个断点:一个自定义UIScrollView)的堆栈跟踪,它似乎是从以下方式调用: -[UITransitionView transition:fromView:toView:] 这是通过dismissModalViewControllerAnimated调用通过调用。

Bootstrap Modal在iOS设备上不起作用

我在使用Bootstrap的网站上工作,有一个问题,我似乎无法修复。 这里是网站的草稿 。 在“我们做什么”面板上,我在第一个缩略图框(在缩略图下面写着“Enterprise Software development”)创build了一个可点击的模式窗口。 如果您在非移动设备上单击缩略图,则会popup一个模式窗口。 在台式电脑(或笔记本电脑)上,它工作得很好。 但是在iOS(iPhone,iPad等)上,它根本不起作用:即点击它不会显示模式窗口。 但是,如果您在“我们是谁”面板的页面上看起来较低,则会出现“查看更多关于Tim …”button。 如果您点击或点击该button,它将适用于所有设备(包括iOS)。 我可以看到两者之间的唯一区别是,第一个是在一个<div>标签,而第二个是在一个<button>标签。 Bootstrap不支持从iOS设备上的<div>启动模式窗口吗? 如果是这样,您是否看到我的代码有任何问题,只会在iOS设备上失败?

基于故事板模式的login屏幕示例

我正在学习ios / xcode并在路障中。 我有一个tabbarcontroller +导航的devise。 如果用户没有login,我需要提供一个login屏幕。这里是基本的层次结构。 login页面需要一个导航条(就像我跟着的教程在条上放一个“Go”button。 LoginController: (LTController.h,.m) Main View:TabBarController> NavigationController>View1>View1a NavigationController>View2 我在这里阅读了很多关于模态视图,委托方法等的post。其中大多数是代码片段,不幸的是我的初学者水平有点过头了。 将不胜感激一个简单的解释,如何实现这一点。 特别是文件需要改变的说明会很好。 谢谢