Pregunta

Soy nuevo en la programación iPhone. Tengo un viewcontoller con un alertview en ella. Cuando se hace clic en el botón OK en alertview que se necesita para otra UITableViewController. Soy capaz de conseguir mis células con objetos en él. pero no puedo conseguir la barra de navegación en la parte superior. por favor, dígame Y es así?

Gracias viki

¿Fue útil?

Solución

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

        }
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top