iphone - How to present a standard UIViewController modally -
i'm trying present standard viewcontroller
modally, can't figure out how it. view controller have buttons trigger dismissing actions, don't need wrap in navigationcontroller
. also, i'm doing of programmatically, without .xibs.
here's code i'm using:
- (void)viewdidappear:(bool)animated { nslog(@"view did appear within rootviewcontroller"); welcomeviewcontroller *welcome = [[welcomeviewcontroller alloc] init]; [self presentmodalviewcontroller:welcome animated:true]; [welcome release]; }
the problem haven't set welcomeviewcontroller's
view, loadview not getting run, means no content being drawn screen.
every example find, including apple's, uses either .xib initialize viewcontroller, navigationcontroller adds rootviewcontroller, or both. understanding loadview called automatically in both of these scenarios. http://developer.apple.com/library/ios/#featuredarticles/viewcontrollerpgforiphoneos/modalviewcontrollers/modalviewcontrollers.html#//apple_ref/doc/uid/tp40007457-ch111-sw3
where configure welcomeviewcontroller's
view? right there after alloc/init? inside welcomeviewcontroller's
init method?
thanks!
where configure welcomeviewcontroller's view?
override loadview
method in subclass. see view controller programming guide ios.
Comments
Post a Comment