Checkbox in UIAlertController with action table in object c

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 
0
source share
1 answer

Try this trick:

  • Learn how to show ViewController as a popup
    • Add UITable to ViewController
    • Show items in UITable
    • Customize UITable by adding custom cells
    • In each of the user cells add a button
    • This button will have two types of images, one empty box and another box with a check mark.
    • When the user touches a table cell, you need to change the button image corresponding to this table row, so the user believes that they check or uncheck
    • and finally add the Finish button at the bottom to close the view manager

Google all of these elements for tutorials. As I said, this is not an easy task, since Xcode does not have a checkmark function.

From: fooobar.com/questions/1012409 / ...

0
source

Source: https://habr.com/ru/post/1012399/


All Articles