iPhone - viewDidUnload/viewDidLoad called inconsistently

て烟熏妆下的殇ゞ 提交于 2019-12-06 15:55:41

Are the unload and load methods supposed to get called when showing and closing an modal view or not.

The behavior should depend on the current memory situation. If memory is low, the system will send memory warnings to all view controllers. A view controller whose view is not currently on screen will react on the memory warning by unloading its view (which will cause a reloading of the view when it comes on screen again, obviously).

So depending on the memory situation of the device and the memory requirements of the modal view controller you are displaying, the unload/load behavior should vary. It should not depend on the modalTransitionStyle IMO.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!