Why is viewDidUnload called less often than viewDidLoad?

前端 未结 3 518
醉梦人生
醉梦人生 2021-02-03 11:19

I put NSLog(@\"%@::%@\", [[self class] description], NSStringFromSelector(_cmd)); in both viewDidLoad and viewDidUnload of a view controll

3条回答
  •  Happy的楠姐
    2021-02-03 11:59

    when a new view loads, the old view can still be loaded in the background. you are searching for viewWillAppear as conterpart i think.

    views only unload in case of a memorywarning.

提交回复
热议问题