UIAlertController* alertController = [UIAlertControlleralertControllerWithTitle:@"选择"message:nilpreferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction* actionOne = [UIAlertActionactionWithTitle:@"拍照"style:UIAlertActionStyleDefaulthandler:nil];
UIAlertAction* actionTwo = [UIAlertActionactionWithTitle:@"从相册中选择"style:UIAlertActionStyleDefaulthandler:nil];
UIAlertAction* actionThree = [UIAlertActionactionWithTitle:@"取消"style:UIAlertActionStyleCancelhandler:nil];
[alertControlleraddAction:actionOne];
[alertControlleraddAction:actionTwo];
[alertControlleraddAction:actionThree];
[selfpresentViewController:alertControlleranimated:YEScompletion:nil];
网友评论