am new to iphone programming. I have a viewcontoller with an alertview in it. When the ok button on alertview is clicked it takes 开发者_Go百科to another UITableviewcontroller. I am able to get my cells with objects in it. but am unable to get the navigation bar on top. please tell me y is it so?
thanks viki
-(void)alertView:(UIAlertView *) alertview clickedButtonAtIndex:(NSInteger)buttonIndex {
if(buttonIndex == 1){
Accidenthelpercall* help = [[Accidenthelpercall alloc]initWithNibName:@"Accidenthelpercall" bundle:nil];
[self presentModalViewController:help animated:YES];
[help setTitle:@"Accident Helper"];
[help release];
}
if(buttonIndex == 2)
{
Accidentdamagecar* damagecar = [[Accidentdamagecar alloc]initWithNibName:@"Accidentdamagecar" bundle:nil];
[[self navigationController] pushViewController:damagecar animated:YES];
[damagecar setTitle: @"Car Damage"];
[damagecar release];
}
}
精彩评论