UIAlertView not functioning correctly

后端 未结 1 1267
面向向阳花
面向向阳花 2021-01-27 07:22

I have a problem when I try to dismiss my UIAlertView. The UIAlertView launches correctly, and displays two buttons: \"Yes\" and \"No\". However, when I select the Yes button, n

相关标签:
1条回答
  • 2021-01-27 07:50

    You need to set the delegate.

    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Are you sure you wish to exit this app and launch the safari browser?"
                                                    message:@"Click yes to continue"
                                                   delegate:self
                                          cancelButtonTitle:@"Yes"
                                          otherButtonTitles:@"No", nil];
    
    0 讨论(0)
提交回复
热议问题