码迷,mamicode.com
首页 > 移动开发 > 详细

IOS7、8模态半透明弹出框

时间:2016-01-24 13:02:23      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:

//源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;  

}  

// 只不过跳转后没有动画效果,有待优化

IOS7、8模态半透明弹出框

标签:

原文地址:http://www.cnblogs.com/56ik/p/5154960.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!