tags:

views:

44

answers:

1

Hello Guys,

I face a strange situation. In my controller viewDidLoad calling before init method. Is any technical reason behind that ?

A: 

No, the viewDidLoad message is always called after init.

Are you sure init is called at all? There are several init methods especially for UIViewController, maybe another one is called instead making you think differently.

If you need more information, please paste the code of viewDidLoad and all of your init methods, and tell us how it is loaded (i.e. with code) or from a nib.

Eiko
Yes , init is calling but after viewDidLoad. For that particular UIViewController just alloc and init. and setting that controller to a UITabBarController as a view controller and presenting the tabbarController ? Is any thing wrong here ?
sandy
Init runs before viewDidLoad, unless you messed up really really bad which is very unlikely. You are missing another init or draw wrong conclusions. What makes you think that init is called after viewDidLoad? And have you checked this is the same object? Again, no code - no way to check.
Eiko