UIAlertController * alert=[UIAlertController alertControllerWithTitle:@"消息" message:@"是否确认?" preferredStyle:UIAlertControllerStyleActionSheet];//sheet
UIAlertAction *ac=[UIAlertAction actionWithTitle:@"ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action){
NSLog(@"222");
}];
UIAlertAction *ca=[UIAlertAction actionWithTitle:@"cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * action){
NSLog(@"333");
}];
[alert addAction:ac];
[alert addAction:ca];
[self presentViewController:alert animated:YES completion:nil];