我需要顯示一個半透明的modal的登錄窗口,但是iOS似乎把調用該方法的controller的view隱藏了因為我有個側邊欄菜單,它本來是被放置于被隱藏的controller的view的后面,當該view被隱藏后,背景變成了側邊欄菜單,但我想要的背景是被隱藏的controller的view
2 回答

largeQ
TA貢獻2039條經驗 獲得超8個贊
self.modalPresentationStyle = UIModalPresentationCurrentContext;[self presentModalViewController:modalVC animated:YES]; // 或者你不用動畫,自己用UIAnimation做一個alpha的漸隱漸現

天涯盡頭無女友
TA貢獻1831條經驗 獲得超9個贊
嘗試一下這個
1、設置你的window的rootViewController
[rootViewController setModalPresentationStyle:UIModalPresentationCurrentContext];
2、用你的rootviewcontroller來present modelview
- 2 回答
- 0 關注
- 177 瀏覽
添加回答
舉報
0/150
提交
取消