Friday, 15 April 2011

ios - Moving from XIB (aka NIB) file to Main.storyboard and the init method is not called -


I always want to launch a word game, so 2 weeks ago I bought an app template.

Unfortunately, the source code purchased uses XIB files (and does not use ARC) - and I would like to change it.

So I got a man. The storyboard file has been added and the first XIB file in it. I have ctrl-drages properties, set the "Initial view controller" checkbox and specify "Main" as the "Main Storyboard File Base Name" (here):

Unfortunately, I see in the debugger, this code which was located in init HomeViewController .m is not run (here):

Xcode

So my question is: init method when using storyboard instead of NIB files To change the name of the key, so that it can be run again?

I think my question is very easy for experienced iOS programmers but I could not find the answer (for example by Apple).

  • To get the storyboard from XIB:

    Move the code from init to initWithCoder:

  • Optimize the core and data code, because < Code> initWithCoder: After being asked: DidFinishLaunchingWithOptions: (while init was called first)


No comments:

Post a Comment