Complete list of Lifecycle functions of ViewController from Starting To End of that Life without using the NIB and With using NIB?
I want complete list of lifecycle functions of view controller with correct sequence.Please any genius.
Please specify with Exact sequence number and From start to End of ViewController's LifeCycle Functions.
Please specify with sequence Number like with usage: and with only short description. example:
with using NIB
1.alloc
usage:blah..blah..
2..init
usage:blah..blah..
3...viewdidload
usage:blah..blah..
without using NIB
1.alloc
usage:blah..blah..
2..init
usage:blah..blah..
3...viewdidload
usage:blah..blah..
..
..
..
Everyone listen please, we have to first understand this concept to make easy as 开发者_开发知识库a iPhone Developer.
Once we understand all of them correctly then we can make anything easier.
I have searched for this Google but i can't get the right answer.
because everyone said different according to their understanding and this make me so confusing more.
To figure out in what order they are called you could use the debugger and a couple of breakpoints or simply put a NSLog(@"viewDidLoad was called");
call in each method.
Experienced programmers would use NSLog(@"%s", __PRETTY_FUNCTION__);
because it automatically prints the method name and can be copied&pasted faster.
The View Controller Programming Guide can be handy too. It explains all that in detail.
精彩评论