From ee3c7c200f83e9060206d9d51b7febfeefa14b50 Mon Sep 17 00:00:00 2001 From: tamarous <532487608@qq.com> Date: Sat, 19 Mar 2016 21:43:34 +0800 Subject: [PATCH] Changed UIAlertView to UIAlertController --- .../ShortVideoController/SDShortVideoController.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/GSD_WeiXin(wechat)/Classes/Home/Host/Controllers/ShortVideoController/SDShortVideoController.m b/GSD_WeiXin(wechat)/Classes/Home/Host/Controllers/ShortVideoController/SDShortVideoController.m index 5ccff57..86aa6f3 100644 --- a/GSD_WeiXin(wechat)/Classes/Home/Host/Controllers/ShortVideoController/SDShortVideoController.m +++ b/GSD_WeiXin(wechat)/Classes/Home/Host/Controllers/ShortVideoController/SDShortVideoController.m @@ -321,9 +321,12 @@ -(void)dealloc{ - (void)show { - if (!_captureDeviceInput) { - UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"无法获取到后置摄像头" message:@"请退出操作" delegate:nil cancelButtonTitle:@"退出" otherButtonTitles:nil]; - [alert show]; + + if (! _captureDeviceInput) { + UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"无法获取到后置摄像头" message:@"请退出操作" preferredStyle: UIAlertControllerStyleAlert]; + UIAlertAction *action = [UIAlertAction actionWithTitle:@"退出" style:UIAlertActionStyleDefault handler:nil]; + [alert addAction:action]; + [self presentViewController:alert animated:true completion:nil]; } self.pan.enabled = YES; self.view.frame = [UIScreen mainScreen].bounds;