开发者

Active modal view is forcefully unloaded after memory warning

开发者 https://www.devze.com 2023-02-13 15:31 出处:网络
I have a problem with a v开发者_运维技巧iew being unloaded which is currenlty active and displayed modally using the following code:

I have a problem with a v开发者_运维技巧iew being unloaded which is currenlty active and displayed modally using the following code:

UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:myContentController];

[navController setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];

[self presentModalViewController:navController animated:YES];

After a memory warning this controller has its view unloaded via the unloadViewForced: method. This results in a black screen being displayed to the user.

Does anyone know what criteria unloadViewIfReloadable uses to determine that the view is active? What setup during the display of the modal view can I do to protect it after a memory warning.


This seems to be related: uiviewcontroller prevent view from unloading

0

精彩评论

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

关注公众号