does viewDidLoad get called after a popViewController call?

依然范特西╮ 提交于 2019-12-12 19:15:03

问题


Does viewDidLoad get called when you're popping back to a UIView?


回答1:


viewDidLoad gets called whenever loadView is called. loadView is called whenever the view is requested from a UIViewController and it is currently nil.

If you pop to a UIViewController and the view property is nil, loadView and hence viewDidLoad will be called. The view could be nil if it was never loaded or if it was unloaded while another view controller was on screen. It might never have been loaded if several view controllers were pushed at once.



来源:https://stackoverflow.com/questions/3106511/does-viewdidload-get-called-after-a-popviewcontroller-call

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