开发者

Why does a modal view controller disappear after switching apps?

开发者 https://www.devze.com 2023-04-12 10:58 出处:网络
I am displaying a modal view controller in my app. When I switch to a different app and then back to mine, the modal view controller is no longer displayed, what I see instead is the view behind it.

I am displaying a modal view controller in my app. When I switch to a different app and then back to mine, the modal view controller is no longer displayed, what I see instead is the view behind it.

I know that the modal view controller is still in the view hierarchy and is simply not drawn, because I can call dismissModalViewController on the parent view controller and the app will behave correctly (if I don't call dismissModalViewController, displaying another modal view controller puts the app into a weird state).

Has anyone else encountered this? Wha开发者_Python百科t can be done to fix it?


There is a thing you should try: try using some "well known" View Controller instead of the one you display and see if you get the same result with disappearance. Like UIImagePickerViewController

0

精彩评论

暂无评论...
验证码 换一张
取 消