Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RobertD63

macrumors 6502
Original poster
Feb 17, 2008
403
42
A place
I'm back with another question. (Of course I am.. haha) I'm in the middle of a tutorial (iTennis) and insted of the splash view I want to load a xib that will let me load different difficulties. I have the xib load correctly and have all of the buttons hooked and everything correctly. I'm just wondering how would I implement when they tap the button they will load the correct view controller?
Heres what I have for the first view that comes up:
Code:
@interface SplashViewController : UIViewController {
	IBOutlet UIButton *easy;
	IBOutlet UIButton *medium;
	IBOutlet UIButton *hard;
	IBOutlet UIButton *cantBeat;

}
@property (nonatomic, retain) IBOutlet UIButton *easy;
@property (nonatomic, retain) IBOutlet UIButton *medium;
@property (nonatomic, retain) IBOutlet UIButton *hard;
@property (nonatomic, retain) IBOutlet UIButton *cantBeat;

-(IBAction)easyClicked;
-(IBAction)mediumClicked;
-(IBAction)hardClicked;
-(IBAction)cantBeatClicked;


@end
Code:
@implementation SplashViewController
@synthesize easy,medium,hard,cantBeat;


-(IBAction)easyClicked {
	
	
}

-(IBAction)mediumClicked{
		
	
}

-(IBAction)hardClicked{
	
	
}

-(IBAction)cantBeatClicked{
		
	
}

//more code..
I was looking it up in the Apple documentation and from what I see there isn't anything I can use or find helpful. I cant load from multiple xibs because I have one xib layout for multiple viewcontrollers. Any help is great :)
 
I'm back with another question. (Of course I am.. haha) I'm in the middle of a tutorial (iTennis) and insted of the splash view I want to load a xib that will let me load different difficulties. I have the xib load correctly and have all of the buttons hooked and everything correctly. I'm just wondering how would I implement when they tap the button they will load the correct view controller?

I'm not at the point where I can remember the exact code off the top of my head but if I recall correctly the Utility App template does, essentially, what you're looking to do. Create a blank one and see if that helps you any.
 
I'm not at the point where I can remember the exact code off the top of my head but if I recall correctly the Utility App template does, essentially, what you're looking to do. Create a blank one and see if that helps you any.

You are correct. The utility code template in XCode does exactly this, creates a "FlipSide" view, which is pretty much what he wants to do
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.