0

나는 다음과 같은 코드를 가진 UIPopoverControllerUIImagePickerController을 제시 할 때 나는 카메라 조리개의 이상한 애니메이션을보고 있어요 :이상한 카메라 조리개 셔터 애니메이션

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; 
[imagePicker setSourceType:UIImagePickerControllerSourceTypeCamera]; 
[popover setContentViewController:imagePicker animated:YES]; 

또한 언급해야 UIPopoverController은 이미 제시되어 이 시점에서 다른 컨텐트 뷰 컨트롤러와 따라서 setContentViewController에 대한 호출은 popover의 컨텐트를 이미지 피커로 변경합니다.

이것은 이미지 선택기가 표시 될 때 모습입니다 : 여기 무슨 일 weird iris shutter animation

?

+0

당신은'애니메이션과 같은 효과를받을 수 있나요? –

+0

예. 제안을 주셔서 감사합니다 :) – Quentin

답변

0

이 과정을 몇 달 동안 끝내고 나는 해결책을 찾았다.

셔터 애니메이션 아래의보기 흉한 검은 색 막대는 콘텐츠 뷰 컨트롤러로 UIImagePickerController을 설정하기 전에 내용보기 컨트롤러의로 UIPopoverControllerUINavigationController을 가지고 있다는 사실과 관련이있다. 검정색 막대의 높이는 UINavigationController의 탐색 막대와 같은 높이입니다.

어쨌든 콘텐츠보기 컨트롤러를 UIImagePickerController으로 설정하기 전에 해결 방법은 팝업 콘텐츠 크기를 [imagePicker contentSizeForViewInPopover]으로 설정하는 것이 었습니다.

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; 
[imagePicker setSourceType:UIImagePickerControllerSourceTypeCamera]; 
[popover setPopoverContentSize:[imagePicker contentSizeForViewInPopover] animated:YES] 
[popover setContentViewController:imagePicker animated:YES]; 

의 핵심은 바로 여기이 호출은 다음과 같습니다 : 여기

는 일부 코드의 NO` :

[popover setPopoverContentSize:[imagePicker contentSizeForViewInPopover] animated:YES] 
관련 문제