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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Draw This
($0.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-30-2009, 03:15 PM   #6 (permalink)
bigdave1024
Registered Member
 
Join Date: Jul 2009
Location: Raleigh, NC
Posts: 75
bigdave1024 is on a distinguished road
Default

I am currently working on an app that utilizes this. In my mainViewController.h I have these 3 IBActions:

Code:
- (IBAction)loadSecondView:(id)sender;
- (IBAction)loadThirdView:(id)sender;
- (IBAction)loadFourthView:(id)sender;
So in my mainViewController.m is like so:

Code:
#import "mainViewController.h"
#import "SecondViewController.h"
#import "ThirdViewController.h"
#import "FourthViewController.h"

@implementation mainViewController

- (IBAction)loadSecondView:(id)sender {

     SecondViewController *Second = [[SecondViewController alloc] initWithNibName:nil bundle:nil];
     [self presentModalViewController: Second animated: YES];

}

- (IBAction)loadThirdView:(id)sender {

     ThirdViewController *Third = [[ThirdViewController alloc] initWithNibName:nil bundle:nil];
     [self presentModalViewController: Third animated: YES];

}

....// Same concept for Fourth view
Then you should be able to go into Interface Builder and create your mainViewController.xib with 3 buttons and connect each button to the correct function. And if you wanted to go back to the main menu you would use a function that calls [self dismissModalViewController: .... animated: YES] in each of your sub view controllers and link a button to the function that makes the call.
bigdave1024 is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,016
Threads: 93,863
Posts: 401,918
Top Poster: BrianSlick (7,962)
Welcome to our newest member, livelifelove52
Powered by vBadvanced CMPS v3.1.0

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