关于创建iOS多个选项的弹出框
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"请选择新增方式" message:@"" preferredStyle:UIAlertControllerStyleAlert]
// 添加按钮
__weaktypeof(alert) weakAlert = alert;
[alertaddAction:[UIAlertAction actionWithTitle:@"新增陈列" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
NSLog(@"点击了确定按钮--%@-%@", [weakAlert.textFields.firstObjecttext], [weakAlert.textFields.lastObjecttext]);
}]];
[alertaddAction:[UIAlertAction actionWithTitle:@"扫描新增" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
NSLog(@"点击了取消按钮");
}]];
[alertaddAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
NSLog(@"点击了其它按钮");
}]];
[self presentViewController:alert animated:YES completion:nil];