Using Xcode 4.2, in my application, view loading is triggered by the segue event. Which method will be called first inside the view controller?
-(void) viewWillAppear:(BOOL)animated
works, but is it the first?
Initialization comes from the Storyboard
, it looks like the init
method is never called manually when creating the object.
Let me make it clear that when creating an instance of a class manually, we usually [[alloc]init]
first. [init]
in this case is the first method to be executed, and a good place for various initializations.
What is equivalent to the init
method when an instance of a class occurs through a segue event? In that case, which method should contain all the initialization logic?
source share