Pregunta

I have a application which is using storyboard. When I developed it, it targeted to ios 5, and everything works very well. However, when I try to run it in ios 6 simulator, I found "PrepareForSegue" method cannot be called.(In this case, my project's development target still targeted to ios 5).

This is my code for prepareForSegue below:

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{

    if ([[segue identifier] isEqualToString:@"sToHowManyTimesView"])
    {

        NSString *title=[relationshipStatus titleForState:UIControlStateNormal];
        NHCThirdViewController *thirdView=[segue destinationViewController];

        thirdView.infoRequest=title;
        relationShipStatus.relstatus=title;

        NSLog(@"%@",title);

    }
    else if([[segue identifier] isEqualToString:@"SinglePage"])
    {
        NSString *title=[relationshipStatus titleForState:UIControlStateNormal];
        relationShipStatus.relstatus=title;

    }
    else if([[segue identifier] isEqualToString:@"toFifthView"])
    {
        NSString *title=[relationshipStatus titleForState:UIControlStateNormal];
        NHCFifithViewController *fifthView=[segue destinationViewController];

        fifthView.infoRequest=title;
        relationShipStatus.relstatus=title;
    }
}

Please help me with it.

No hay solución correcta

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