viewDidUnload no longer called in ios6

前端 未结 3 1118
傲寒
傲寒 2021-02-01 19:38

I just installed the new version of Xcode/ios6. viewDidUnload is now depreciated.

In the apple doc,

viewDidUnload [...] Deprecated in iOS 6.0. Vi

3条回答
  •  执笔经年
    2021-02-01 19:55

    I recommend you to use weak property for the IBOutlets like

    @property (weak) IBOutlet UILabel * labelText;
    

    That way you don't need to do anything in dealloc. In iOS 6, simply ViewDidUnload won't call, iOS5 or earlier it is just call when memory warning have occur.

提交回复
热议问题