1) С помощью этого кода, нажав «Do кнопку что-то» может сделать какое-то действие, но не приведет к alertView
не скрывая
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Title" message:@"The message." delegate:self cancelButtonTitle:nil otherButtonTitles: @"Do something", nil] show];
#pragma mark - UIAlertViewDelegate
- (BOOL)alertViewShouldEnableFirstOtherButton:(UIAlertView *)alertView {
return NO;
}
2) С помощью этого кода не будет никакого кнопки на alertView
(Я думаю, что это то, что вам действительно нужно)
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Title" message:@"The message." delegate:self cancelButtonTitle:nil otherButtonTitles:nil] show];