I’m a little rusty on my Cocoa, and have a simple question. When I make a “View-based application” in XCode 4, I get a main window xib, an app delegate, and a UIViewController subclass and xib. The main window xib includes the UIViewController subclass as an object. But I don’t see a call to “init” on this UIViewController anywhere in code or in the inspector. How did this view controller get initialized? I guess an embedded object’s “init()” just magically get called somehow?
Share
Please have a look at when exactly do Interface Builder items get instantiated?, I’ve provided an answer which describes the process of nib loading.