Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 05-22-2009, 12:37 PM   #8 (permalink)
jsd
at this moment
 
Join Date: Mar 2009
Location: San Francisco, CA
Posts: 900
Default

I got it to work. In the first view controller, do this to launch the modal nav:

Code:
ModalViewController *modal = [[ModalViewController alloc] init];	
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:modal];
[self presentModalViewController:nav animated:YES];
[modal release];
then, in the one that is loaded, do this:

Code:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
		self.title=@"hi mom";
        // Custom initialization
    }
    return self;
}
works for me. the modal view controller slides in with a nav bar containing "hi mom" as the title. let me know if you want me to send you the full xcode project.
jsd is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,822
Threads: 89,206
Posts: 380,635
Top Poster: BrianSlick (7,129)
Welcome to our newest member, gladlard24
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:28 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.