cocoa touch - Is initWithNibName and initWithCoder method of UIView or UIViewController? -


it seems saw them in both. funny given not inherit 1 another. have common ancestor, 1 owns initwithcoder , iniwwithnibname?

so gives?

also in uiviewcontroller reference class initwithcoder not mentioned @ all

-(id)initwithcoder:(nscoder *)adecoder {     //nsstring * superclass =nsstringfromclass([self superclass]) ;     self = [self initwithnibname:nil bundle:nil];     if (self) {     }     return self; } 

questions should start search in reference docs.

initwithnibname:bundle: method of uiviewcontroller , no other class (other classes extend uiviewcontroller).

initwithcoder: method declared in nscoding protocol. class (and there many) conform nscoding protocol have initwithcoder: method. both uiview , uiviewcontroller implement nscoding protocol means both classes have initwithcoder:.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo