關(guān)于創(chuàng)建iOS多個(gè)選項(xiàng)的彈出框

UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"請(qǐng)選擇新增方式" message:@"" preferredStyle:UIAlertControllerStyleAlert]
// 添加按鈕
?? ?__weaktypeof(alert) weakAlert = alert;
? ? [alertaddAction:[UIAlertAction actionWithTitle:@"新增陳列" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
? ? ? ? NSLog(@"點(diǎn)擊了確定按鈕--%@-%@", [weakAlert.textFields.firstObjecttext], [weakAlert.textFields.lastObjecttext]);
? ? }]];
[alertaddAction:[UIAlertAction actionWithTitle:@"掃描新增" style:UIAlertActionStyleDefault?handler:^(UIAlertAction *action) {
? ? ? ? NSLog(@"點(diǎn)擊了取消按鈕");
? ? }]];
?? ?[alertaddAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
? ? ? ? NSLog(@"點(diǎn)擊了其它按鈕");
? ? }]];
?? ?[self presentViewController:alert animated:YES completion:nil];