대상 : 다른 GUI가 실행되는 동안 자동 모드로 사진을 찍습니다. 을 내가 그렇게도 ... 나에게 무엇을 알려 무엇을 어떤 카메라 GUI를 원하지 않는다 :UIImagePickerController takePicture 메서드
OS : viewDidLoad에 실행할 때 IOS 4.3
내가 테스트를하고, 나는 자동 모드로 하나 개의 이미지를 먹고 싶어 당신이 생각해 ..
관찰 UIImagePickerController 나는 몇 가지 속성을 할당하고 takePicture 메서드를 실행할 수 있습니다. 결론은 그것을 실행하려고 할 때 아무 일도 일어나지 않는다는 것을 알았습니다. 몇 KB를 보았습니다. 기다려 .. 그래서 나는 잠을 잤지 만 (10) 도움이되지 않았다.
어쩌면 내가 대리인을 읽을 필요가없는 동안 어딘가에서 대리인이 누락되었을 수도 있습니다 .. 생각은?
헤더 파일 : 여기
코드입니다#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface VisionViewController : UIViewController
{
UIImagePickerController *controller;
}
-(void)settingControllerAndTakingPicture;
@end
및 구현 파일
// 일반적으로 코코아 콩,보기를로드 한 후 추가 설정을 할 수있는 viewDidLoad를 구현합니다. - (void) viewDidLoad { [super viewDidLoad];
//Taking an Image
[self settingControllerAndTakingPicture ];
}
-(void)settingControllerAndTakingPicture
{
controller = [[UIImagePickerController alloc] init];
//Setting the control source type as the Camera device.
controller.sourceType = UIImagePickerControllerSourceTypeCamera;
//Camera display is off, the player will not see it during games.
controller.showsCameraControls = NO;
//Picking only the front camera.
controller.cameraDevice = UIImagePickerControllerCameraDeviceFront;
//Turning the camera flash off.
controller.cameraFlashMode = UIImagePickerControllerCameraFlashModeOn;
//Setting the controller view as self view
controller.view = self.view;
//Taking a picture
[controller takePicture];
}
는 다시 나는 침묵 모드에서만 흥미입니다.
감사합니다. 다음을 시도했지만 도움이되지 않았습니다. –
// 자체 뷰로 컨트롤러 OverLayView 설정 imageController.cameraOverlayView = self.view; \t \t \t \t // 모달 자식으로 imageController를 표시합니다. 애니메이션 효과가있는 경우 세로 시트 전환을 사용합니다. \t \t [self presentModalViewController : imageController animated : YES]; –