I inserted a button in IB, added this code in the .h file
-(IBAction)buttonPressed:(id)sender;
Connected the action to the button in IB (Touch
The method appears fine to me. Double check that:
You've set in IB the class of your view controller that contains the button to the correct class.
When you right-click on the button in IB it has the IBAction
hooked up.
You aren't showing the rest of your code - it should look something like
YourViewController *yourViewController = [[YourViewController alloc] initWithNibName:@"YourViewController" bundle:nil];
yourViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:yourViewController animated:YES];
make sure that you have included YourViewController.h in the .m of the calling View Controller .