2012-07-19 3 views
0

I는 UIModalPresentationFormSheet 및 개구 UIImagePickerController를 (또는 임의의 UIViewController)하지만 UIModalPresentationFormSheet의 크기를 사용하고있는 UIImagePickerController를 또는 modalViewController에서UIImagePickerController를 :시오

modalViewController *changeProfilePicture = [[ModalViewController alloc] init]; 
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:modalViewController]; 
navigationController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; 
navigationController.modalPresentationStyle = UIModalPresentationFormSheet; 
[mainViewController presentModalViewController:navigationController animated:YES]; 
navigationController.view.superview.frame = CGRectMake((CGRectGetWidth(mainViewController.view.bounds)-300)/2, (CGRectGetHeight(mainViewController.view.bounds)-300)/2, 300, 300); 

는 I가 화상 선택을위한 UIImagePickerController를를 개방하고 다른 제어기 기각 때 변경 전체 화면 모드에서. modalViewController의 프레임 크기는 거의 두 배가된다.

popoverview에서 UIImagePickerController를 열면 괜찮 았습니다.

여기 내 요구 사항은 전체 화면 모드에서 다른 viewController를 열어야하는 것과 같습니다.

모든 아이디어 modalViewController 프레임 크기를 그대로 유지하는 방법.

답변

0

부모보기의 프레임 크기를 self.frame으로 가져 와서 문제가있는 UIImagePicker로 전송하는 것이 좋습니다. 크기를 줄여야합니다.

+0

감사합니다. Taylor, 당신이하고 싶은 말. UIImagePicker 또는 다른 것의 크기를 줄여야합니까? –

+0

네, UIImagePicker의 크기를 변경해야한다고 생각합니다. 결국, modalView 프레임을 '팽창시키는'것은 무엇입니까? 메모에서 현재 Rect를 변수에 저장하여 UIImagePicker를 추가 한 후 크기를 '재설정'할 수 있습니다. 시도해보고 나서 어떻게 말해 주는지 ... – ATaylor