2012-08-30 5 views
-2

У меня проблемы, когда я выполняю UIAlertView (представление предупреждения работает нормально), но ... я не могу выполнить segue в другое окно ... тип перехода является модальным .. . любая помощь?Storyboard не меняет вид после uialertview

if([txtPeticion hasText]) 
{ 
    alertaVeladora = [[UIAlertView alloc] 
          initWithTitle:@"Santuario Virtual" 
          message:@"Gracias por compartir tu veladora!" 
          delegate:self 
          cancelButtonTitle:nil 
          otherButtonTitles:nil]; 

    [alertaVeladora show]; 
    [self postMessage:txtPeticion.text shareTw:shareTwitter shareFb:shareFacebook withEmail:email]; 
    txtPeticion.text = @""; 
    [self performSelector:@selector(dismissAlert:) withObject:alertaVeladora afterDelay:1.0f]; 
} 

ответ

2

Если я правильно понял, вы хотите выполнить segue, когда пользователь нажимает кнопку увольнения на AlertView? Чтобы выполнить действие при нажатии кнопки, используйте следующий код:

if([txtPeticion hasText]) 
{ 
    alertaVeladora = [[UIAlertView alloc] 
         initWithTitle:@"Santuario Virtual" 
         message:@"Gracias por compartir tu veladora!" 
         delegate:self 
         cancelButtonTitle:nil 
         otherButtonTitles:nil]; 

[alertaVeladora show]; 
} 

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex 
{ 
    if(alertView.tag == 1) 
    { 
     // Perform Segue 
     [self performSegueWithIdentifier: @"MySegue" sender: self]; 

    } 
} 
Смежные вопросы