开发者

UIViewController Functions Calling Hierarchy

I have been asked this question in many interviews for iPhone Developer position. I have googled it but couldnt find a开发者_运维问答 satisfactory answer. The Question is

" what is the order of calling for the UIViewController functions " Some of functions that i know are

  1. loadview
  2. viewDidLoad
  3. viewWillAppear
  4. viewDidUnload


It goes something like this:

-loadView,
-viewDidLoad,
-viewWillAppear,
-viewDidAppear,
-viewWillDisappear,
-viewDidDisappear,
-viewDidUnload


Try to put:

 NSLog(@"%@::%@", [[self class] description], NSStringFromSelector(_cmd)); 

in every function of the above and see how things going in the log window...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜