i ve got an IBACtion button when the button is clicked.it got to open a new view.when the button is clicked i m getting EXC_BAD_ACCESS.i ve enabled NSZOMBIE and it shows the last line in the function -(void)homepage could u guys help me out..below is the code.
splashscreen.h
@interface SplashScreen : UIViewController {
HomePage *newEnterNameController;
}
@property(nonatomic,retain)HomePage *newEnterNameController;
@end
splashscreen.m
@implementation SplashScreen
@synthesize newEnterNameController;
-(void)homepage
{
self.newEnterNameController = [[HomePage new] initWithNibName:@"HomePage"bundle:
[NSBundle mainBundle]];
[newEnterNameController setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
[self presentModalViewController:self.newEnterNameController animated:YES];
}
- (void)dealloc {
[self.newEnterNameController release];
[super dealloc];
}
@end
[Class new]is equal to[[Class alloc] init], so you are initializing object twice. This line should probably look like this: