IBOutlet and viewDidUnload under ARC

前端 未结 5 793
野性不改
野性不改 2021-01-30 09:01

There is a similar question to this on SO here, however I just want to clarify something that wasn\'t fully explained there.

I understand that all delegates and outlets

5条回答
  •  梦如初夏
    2021-01-30 09:41

    I did a little testing and it appears that the code in the viewDidUnload method is unnecessary. To support this, the docs for viewDidUnload do actually say:

    By the time this method is called, the view property is nil.

    Indicating that the weak reference must have been set to nil automatically.

提交回复
热议问题