I am creating a UIViewController using the nib file ?
I have implemented the following 2 methods
in my view controller, but these methods are not getting called every time ?
What is the error in the code ?
从笔尖初始化时,可以使用awakeFromNib
方法 。
Depending on how you load your viewController, your
(void)viewDidAppear:(BOOL)animated
(void)viewWillAppear:(BOOL)animated
will not get called.
Here is one way I load viewcontrollers. As you see, I explicitly call viewDidAppear, viewDidDisappear, etc. myself.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.