Do I always have to call [super viewDidLoad] in the -viewDidLoad method?

前端 未结 8 839
[愿得一人]
[愿得一人] 2020-11-27 16:18

In Apple\'s scrollView example they don\'t call that. I always thought that\'s a must. Why should I call that anyways?

8条回答
  •  余生分开走
    2020-11-27 16:22

    Apple's documentation for viewDidLoad does NOT state that you should call [super viewDidLoad], so I would go with what Apple's says. Note, however, that for other similar methods like viewDidAppear, you must call [super viewDidAppear].

提交回复
热议问题