Alertview单击UITableviewcontroller

时间:2010-03-04 19:09:19

标签: uialertview

我是iphone编程的新手。我有一个带有alertview的viewcontoller。当单击alertview上的ok按钮时,它将转到另一个UITableviewcontroller。我能够让我的细胞中有物体。但我无法将导航栏放在顶部。请告诉我你是这样吗?

感谢 VIKI

1 个答案:

答案 0 :(得分:0)

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

        }
}