I have a UITableViewController subclass that\'s instantiated, depending on where it\'s used, in a NIB or via code. In both cases I want to do customization in
My confusion was based on the mistaken belief that each class should have a single designated initializer. This is not true, and in the case of UITableViewController there are 3 designated initializers (as far as I can tell):
initWithStyle: declared locallyinitWithNibName:bundle: inherited from UIViewControllerinitWithCoder: from adopting NSCoding protocolYou need to override 1 or more of these in your subclass depending on how your subclass gets instantiated. In my case I had to implement #2 and #3 since the class can be loaded from a NIB, or instantiated via code with reference to a NIB. (I imagine it's rare that you'll use both initWithStyle: and initWithNibName:bundle: for a single class.)
I found Apple's Coding Guidelines for Cocoa helpful.