Tuesday, February 16, 2010

Programmer - Switching Views in iPhone SDK?

Programmer Question

How come this won't switch views for me? When I click the button it does nothing...



-(IBAction)howtoplayButtonClicked{
howToPlayViewController = [[HowToPlayViewController alloc] initWithNibName:@"HowToPlayViewController" bundle:nil];
[self.navigationController pushViewController:howToPlayViewController animated:YES];
[HowToPlayViewController release];

}


in the .h file I have this...



#import <UIKit/UIKit.h>
#import "HowToPlayViewController.h"

@interface PopToItViewController : UIViewController {

HowToPlayViewController *howToPlayViewController;

}

-(IBAction)howtoplayButtonClicked;

@end

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails