-2

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];
}
4

1 に答える 1

2

私が正しく理解している場合、ユーザーが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];

    }
}
于 2012-08-30T17:55:46.117 に答える