What happens is that the default implementation of initWithNibName:bundle: searches the main Bundle for the Nib file with the same name as the View Controller class. This happens if you automatically choose the option to create Nib or not. See the UIViewController documentation (part of a discussion of initWithNibName:bundle: .
Now the initWithNibName:bundle: method is the default initializer of the UIViewController, which means that even if you do not use it directly (say that you use init ), it will still be called under the hood.
Finally, even if you deleted the Nib file from Xcode, for some reason (not sure why) it is not deleted from the main package (at least in the simulator). Even if you clean and build a project, it remains there. The solution I use to completely get rid of the Nib file is to remove the application from the simulator, and then clean and build it again.
Hope this helps!
source share