0
Я хочу добавить флажок i.e uibutton и uilabel одним опцией в UIAlertAction и только кнопкой в другом UIAlertAction в UIAlertController.Флажок в UIAlertController с таблицей действий в объекте c
Пожалуйста, помогите и совет, как его достичь.
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"My Alert"
message:@"This is an action sheet."
preferredStyle:UIAlertControllerStyleActionSheet]; // 1
UIAlertAction *firstAction = [UIAlertAction actionWithTitle:@"one"
style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
NSLog(@"You pressed button one");
}]; // 2
UIAlertAction *secondAction = [UIAlertAction actionWithTitle:@"two"
style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
NSLog(@"You pressed button two");
}]; // 3
[alert addAction:firstAction]; // 4
[alert addAction:secondAction]; // 5
Вместо копирования чужого ответа (даже если вы сделали киньте ссылку), просто голосовать, чтобы закрыть этот вопрос как дубликат. – rmaddy