//源Controller中跳转方法实现

MKDialogController *controller = [[MKDialogController alloc] init];

controller.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;  // 跳转时的动画效果,可以修改

if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {

 controller.providesPresentationContextTransitionStyle = YES;

 controller.definesPresentationContext = YES;

 controller.modalPresentationStyle = UIModalPresentationOverCurrentContext;

 [self presentViewController:controller animated:YES completion:nil];

} else {

   self.view.window.rootViewController.modalPresentationStyle = UIModalPresentationCurrentContext;

[self presentViewController:controller animated:NO completion:nil];

   self.view.window.rootViewController.modalPresentationStyle = UIModalPresentationFullScreen;

}

通过上面的方法模态出的新页面的self.view设置有透明的时候,就可以看到上一层controller的页面。


版权声明:欢迎转载,请注明出处:蜗牛爱课 • 移动互联网

最新文章

  1. VS Extract Method
  2. 快速入门系列--MVC--04模型
  3. C语言:void指针
  4. Cordova - 使用Cordova开发iOS应用实战1(配置、开发第一个应用)
  5. Jquery简单瀑布流代码示例
  6. [Linux] yum和apt-get用法及区别
  7. VC++ 利用MAPI实现在程序中调用默认的电子邮件程序发送EMAIL(可以添加附件)。
  8. Kinect帮助文档翻译之一 入门
  9. UI基础 获取当前屏幕显示的viewcontroller
  10. css学习の第一弹—格式创建
  11. Perl基础速成
  12. javascript隐式原型
  13. LinkedList 实现 Queue
  14. PowerDesign的简单使用方法
  15. File available()方法
  16. win7 IIS7 发布网站遇到 HTTP 错误 500.19 由于权限不足
  17. 对WEB url 发送POST请求
  18. JQuery元素控制方法汇总
  19. ubuntu遇到的问题
  20. AngularJS - 路由 routing 基础示例

热门文章

  1. Bootstrap的datepicker控件
  2. sublimetext3官网安装
  3. UVa 11488 - Hyper Prefix Sets
  4. node.js入门(二) 第一个程序 Hello World
  5. VirtualBox添加共享文件夹
  6. Linq to DataSet 和 DataSet使用方法学习
  7. Android进程
  8. iphone iOS7恢复到iOS6教程
  9. Yii console 创建命令行应用
  10. 使用委托解决"线程间操作无效: 从不是创建控件“textBox1”的线程访问它" 问题