开发者

ViewDidLoad super

开发者 https://www.devze.com 2023-01-11 04:34 出处:网络
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 y

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

精彩评论

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