ios 오토 포커스 기능 체크 하는 소스
NSArray *devices = [AVCaptureDevice devices];
AVCaptureDevice *frontCamera;
AVCaptureDevice *backCamera;
for (AVCaptureDevice *device in devices) {
DEBUGMSG(@"Device name: %@", [device localizedName]);
if ([device hasMediaType:AVMediaTypeVideo]) {
if ([device position] == AVCaptureDevicePositionBack) {
DEBUGMSG(@"Device position : back");
backCamera = device;
}
else {
DEBUGMSG(@"Device position : front");
frontCamera = device;
}
}
}
if([backCamera isFocusModeSupported:AVCaptureFocusModeAutoFocus])
{
}else
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil
message:@"오토 포커스 기능이 없다."
delegate:nil
cancelButtonTitle:@"ok"
otherButtonTitles:nil];
[alert show];
}
'아이폰' 카테고리의 다른 글
카카오 로그인 ios 적용 (0) | 2015.08.26 |
---|---|
ios 텍스트 이미지 디폴트 공유 - ios shared text image (0) | 2015.04.09 |
objective-c 함수포인터를 사용한 함수 호출 (0) | 2014.01.03 |
앱에서 이미지 동영상 겔러리로 저장 (0) | 2013.10.28 |
ios custom keyboard (0) | 2013.06.12 |