Is it true that UITabBarController
never calls initWithNibName
on its child views (individual tabs)? Or have I just set my app up in a really screwed-up way?
My MainWindow.xib looks like this in interface builder: tab bar in interface builder http://web.mit.edu/keone/Public/tabbar.png
Note that the Window is completely blank while all the action happens in the Tab Bar Controller.
My app delegate calls [window addSubview:tabBarController.view]
in application:did开发者_运维知识库FinishLaunchingWithOptions
and once that happens we're off to the races!
But when I put breakpoints on the init
, initWithNibName:
, and initWithNibName:bundle:
methods in any of my individual controllers (which are listed in Interface Builder as children of the tabs, as the image above shows), nothing catches.
Thanks in advance!
It doesn't call initWithNibName:
, they call initWithCoder:
-- initWithNibName:
is only called when you programmatically instantiate a class and hand it a xib file to define its subviews from.
(Updated: I remembered wrong, initWithNibName:
is never called unless one makes the call oneself.)
精彩评论