iOS 8에서 지금까지 카메라에서 이미지를 캡처하는 데 문제가 있습니다.
UIImagePickerController *controller=[[UIImagePickerController alloc] init];
controller.videoQuality=UIImagePickerControllerQualityTypeMedium;
controller.delegate=(id)self;
controller.sourceType=UIImagePickerControllerSourceTypeCamera;
[self presentViewController:controller animated:YES completion:nil];
그러나 iOS 8에서 나는 이것을 얻고있다 :
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
나는이 제공하는 솔루션을 시도한 이 게시물 에
@property (strong,nonatomic)UIImagePickerController *controller;
_controller=[[UIImagePickerController alloc] init];
_controller.videoQuality=UIImagePickerControllerQualityTypeMedium;
_controller.delegate=(id)self;
_controller.sourceType=UIImagePickerControllerSourceTypeCamera;
_[self presentViewController:controller animated:YES completion:nil];
이
...
controller.modalPresentationStyle=UIModalPresentationFullScreen;
or
controller.modalPresentationStyle=UIModalPresentationCurrentContext;
...
이
double delayInSeconds = 0.1;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
[self presentViewController:controller animated:YES completion:nil];
});
이
[self presentViewController:controller animated:YES completion:NULL];
이
[self presentViewController:controller animated:YES completion:^{
}];
어떤 생각?
dispatch_async(dispatch_get_main_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
I로 변경하는dispatch_async(dispatch_get_main_queue(), ^{