UIAlertView调用电话

时间:2014-11-06 10:59:23

标签: ios

参见此GIF

这是代码

-(void)goGuestInfo
{
    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:[@"label.change" localize]
                                                        message:@"d"
                                                       delegate:self
                                              cancelButtonTitle:[@"label.cancel" localize]
                                              otherButtonTitles:[@"label.name" localize],
                                                                [@"label.email" localize],
                                                                [@"label.phone" localize], nil];
    [alertView show];
}

#pragma mark - Alertview delegate

-(void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
    switch (buttonIndex) {
        case 0: break;
        case 1: [self performSegueWithIdentifier:HotelBookingGuestEditNameSegue sender:nil]; break;
        case 2: [self performSegueWithIdentifier:HotelBookingGuestEditEmailSegue sender:nil]; break;
        case 3: [self performSegueWithIdentifier:HotelBookingGuestEditPhoneSegue sender:nil]; break;
        default: break;
    }
}

只有当我按下“姓名”时才会这样做(即案例1:)。

我之前从未体验过这种情况,而且我多次使用过alertview。我错过了一些明显的东西吗在我回到应用程序后,它将按照应有的方式进行分段。

1 个答案:

答案 0 :(得分:0)

#imports内的某个地方有一个didClickButtonAtIndex拨打了电话。