Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
386 views
in Technique[技术] by (71.8m points)

iphone - 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...