我想在UIAlertAction的一个选项中添加复选框,即uibutton和uilabel 并且只在UIAlertController中的另一个UIAlertAction中按下。
请帮助并建议如何实现它。
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 :(得分:0)
尝试这个技巧:
谷歌所有这些项目的教程。正如我所说,这不是一项简单的任务,因为Xcode中没有开箱即用的复选标记功能。