我需要显示一个半透明的modal的登录窗口,但是iOS似乎把调用该方法的controller的view隐藏了
因为我有个侧边栏菜单,它本来是被放置于被隐藏的controller的view的后面,当该view被隐藏后,背景变成了侧边栏菜单,但我想要的背景是被隐藏的controller的view
有什么好的办法?我看这里介绍了不少方法,但都不是很方便
http://stackoverflow.com/questions/84…
self.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentModalViewController:modalVC animated:YES]; // 或者你不用动画,自己用UIAnimation做一个alpha的渐隐渐现
尝试一下这个
1、设置你的window的rootViewController
[rootViewController setModalPresentationStyle:UIModalPresentationCurrentContext];
2、用你的rootviewcontroller来present modelview
正文完