Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/110.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 何时在UIViewController生命周期方法中调用super?_Ios_Objective C_Swift_Uiviewcontroller_Lifecycle - Fatal编程技术网

Ios 何时在UIViewController生命周期方法中调用super?

Ios 何时在UIViewController生命周期方法中调用super?,ios,objective-c,swift,uiviewcontroller,lifecycle,Ios,Objective C,Swift,Uiviewcontroller,Lifecycle,我见过UIViewController生命周期方法的实现,其中超级方法在开始时被调用,如下所示: override func viewDidLoad(){ super.viewDidLoad() //在超级电话后做些事情。 } 但我也看到了这一点: 覆盖func VIEWDIDEGLEASE(uu动画:Bool){ //在超级呼叫之前做一些事情。 super.ViewDidEnglish(动画) } 什么时候应该在结束时调用super?viewdiddefine清除VC中的内容,这样以后你就

我见过UIViewController生命周期方法的实现,其中超级方法在开始时被调用,如下所示:

override func viewDidLoad(){
super.viewDidLoad()
//在超级电话后做些事情。
}
但我也看到了这一点:

覆盖func VIEWDIDEGLEASE(uu动画:Bool){
//在超级呼叫之前做一些事情。
super.ViewDidEnglish(动画)
}

什么时候应该在结束时调用
super

viewdiddefine清除VC中的内容,这样以后你就没有机会再这样做了。在那之后,一切都结束了:)你可以检查我关于重复问题的答案: