Does Apple say anywhere in the docs that you should be subclassing UIViewController (or one of its subclasses) for the File's Owner in xib files?
In Mac OS programming I use NSObject subclassed objects as file owners all the time. Has that changed for iOS? I can't seem find any reason not to but seeing [super viewDidLoad] in UIViewController subclasses made me think of this since you dont need to call [super awakeFromNib] 开发者_Python百科in OSX programming.
UIViewController
is an abstract class: it's meant to be subclassed and used as a File's Owner. It's got very nice features for views. I recommend you not to use awakeFromNib
in favor of viewDidLoad
and others.
I hope Mac OS X gets view controllers too. Window controllers ain't right yet.
精彩评论