i have two view controller firstviewconroller and secondviewcontroller. i have alert view in firstviewconroller now i want to goto second secondviewcontroller. clicking alert view button. guide me how to call secondviewcontroller using code.i'm new to this stuff. here is my alert view code.
-(IBAction)enter:(id) sender{
UIAlertView *alertBox=[[UIAlertView alloc]initWithTitle:@"ThinkTax!" message:@"0.0" delegate:self cancelButtonTitle:@"Button 1" otherButtonTitles:nil];
[alertBox addButtonWithTitle:@"Sve"];
[alertBox addButtonWithTitle:@"Button 3"];
if(FALSE)
{
[alertBox addButtonWithTitle:@"Button 4"];
}
[alertBox show];
[alertBox release];
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
NSString *title = [alertView buttonTitleAtIndex:buttonIndex];
if([title isEqualToString:@"details"])
{
UIViewController *secondViewController = [[Hello_WorldViewController alloc] initWithNibName:@"<Hello_WorldViewController >" bundle:nil];
[self Page3:secondViewController animated:YES];
[secondViewController release];
NSLog(@"Button details was selected.");
}
else if([title isEqualToString:@"mail"])
{
NSLog(@"Button mail was selected.");
}
else if([title isEqualToString:@"close"])
{
NSLog(@"Button close was selected.");
}
}
now its showing console output like this.i don't know where i'm doing wrong.
-[Page3 Page3:animated:]: unrecognized selector sent to instance 0x8d26ba0
Hello World[5961:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Page3 Page3:animated:]: unrecognized selector sent to instance 0x8d26ba0'