Created
June 13, 2015 04:48
-
-
Save jebai0521/c0c841517ce9714418b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOL isCameraValid = YES; | |
//判断iOS7的宏,没有就自己写个,下边的方法是iOS7新加的,7以下调用会报错 | |
if(isIOS7AndLater) | |
{ | |
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo]; | |
if (authStatus != AVAuthorizationStatusAuthorized) | |
{ | |
isCameraValid = NO; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment