你的位置:首页 > 软件开发 > 操作系统 > IOS7、8模态半透明弹出框

IOS7、8模态半透明弹出框

发布时间:2016-01-24 21:00:07
//源Controller中跳转方法实现 MKDialogController *controller = [[MKDialogController alloc] init]; controller.modalTransitio ...

//源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模态半透明弹出框

关键词:IOS

IOS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。