开发者

ViewDidLoad super

In viewDidLoad do you put [super viewDi开发者_开发技巧dLoad] before or after your code? Is it the same for all other methods?


Before. You want the super initialization to happen before yours, so that your code could rely on the super state.

As for the other methods - it depends whether you want your code to touch the parameters before calling the super method or it needs to process the result of it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜