- (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated{
if (0 == [alerts cancelButtonIndex]) {
NSLog(@"YES");
} else if (1 == [alerts cancelButtonIndex]) {
NSLog(@"NO");
}
}
У меня есть UIAlertView, вот инициализация оповещений:
alerts = [[UIAlertView alloc] initWithTitle:@"Trumpets" message:@"Are you sure you would like to use one trumpet, this will give you 10 random units" delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
[alerts show];
Ожидается ошибка ')' before '(' token
Я не понимаю, NSLogs должны были помочь вспомнить, какой вариант был каким.
Заранее спасибо