Why/when do we have to call super.ViewDidLoad?

前端 未结 5 1859
你的背包
你的背包 2020-12-13 17:30

Everyone tells me \"Use super.viewDidLoad() because it\'s just like that\" or \"I\'ve been doing it always like that, so keep it\", \"It\'s wrong if you don\'t call super\",

5条回答
  •  無奈伤痛
    2020-12-13 17:44

    I have a secret, when I worked at Apple I read the source code for UIKit, partly to answer questions I had like this, viewDidLoad is empty in all the UI*ViewController classes.

    Naturally I am not there anymore, they may have changed this.

提交回复
热议问题