iOS开发之模态窗口居中弹出背景半透明

2017-09-12  本文已影响55人  朱晓晓的技术博客

类似效果

image.png

主要代码

//被跳转的控制器
UIViewController * vc = [UIViewController currentViewController];  
vc.view.window.rootViewController.modalPresentationStyle = UIModalPresentationCurrentContext;  
[vc presentViewController:controller animated:NO completion:nil];  
vc.view.window.rootViewController.modalPresentationStyle = UIModalPresentationFullScreen;  

参考链接:
http://blog.csdn.net/vbirdbest/article/details/51086543

上一篇下一篇

猜你喜欢

热点阅读