I want to add the flag ie uibutton and uilabel with one option in UIAlertAction and only a button in another UIAlertAction in UIAlertController.
Please help and advice on how to achieve it.
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
source share