tags:

views:

87

answers:

1

am new to iphone programming. I have a viewcontoller with an alertview in it. When the ok button on alertview is clicked it takes 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

A: 

-(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];

}