ios开发--模态视图

         一个视图控制器用另一个视图控制器的视图取代它自己的视图。这就是模态(modal)视图。

10年积累的成都做网站、成都网站制作经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站设计后付款的网站建设流程,更有泗洪免费网站建设让你可以放心的选择与我们合作。

         A modal view (that is, a view presented modally) provides self-contained functionality in the context of the current task or workflow.

         明显的,模态视图打断了当前的视图堆栈,新生成了一个视图,这个视图当然也是有视图控制器的,你可以这么使用模态视图:

  • Use them to gather information from the user immediately.

  • Use them to present some content temporarily.

  • Use them to change work modes temporarily.

  • Use them to implement alternate interfaces for different device orientations.

  • Use them to present a new view hierarchy with a specific type of animated transition (or no transition).

          任何视图控制器都可以成为模态视图控制器。模态视图和普通视图之间的差异:

ios开发--模态视图

还是有些小差异的。

        模态视图的两个参数:

modalTransitionStyle

      UIModalTransitionStyleCoverVertical

      UIModalTransitionStyleFlipHorizontal

      UIModalTransitionStyleCrossDissolve

      UIModalTransitionStylePartialCurl

modalPresentationStyle

      UIModalPresentationFullScreen

      UIModalPresentationPageSheet

      UIModalPresentationFormSheet

      UIModalPresentationCurrentContext

这两个参数是指过渡方式和最终的呈现方式。

        模态视图和显示出它的视图之间存在父子关系,一般都是通过父视图来显示和关闭:

        presentModalViewController:controller    animated:YES

        dismissModalViewControllerAnimated:YES

 

模态视图控制器和UIPopoverController的主要不同是用户必须响应模态视图。

 

模态对话框主要有UIAlertView, UIActionSheet, UILocalNotification。这个就不一一赘述了。

 

关于模态视图其实有个最重要的问题是:为什么称为模态?还没想明白。

 

 

分享名称:ios开发--模态视图
当前地址:https://www.cdcxhl.com/article12/pgoigc.html

成都网站建设公司_创新互联,为您提供网站收录网站导航网站内链标签优化静态网站网站设计

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都seo排名网站优化