これは、アプリケーション デリゲートのウィンドウにビューを追加することを含む、imagePicker をズームするために使用したコードです。まったく同じではありませんが、少なくとも ModalViewController を使用して表示する必要がないことを示しています。簡単に適応 -
-(void)presentCameraWithDelegate:(id)theDelegate {
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
[self setImagePickerController:imagePicker];
imagePicker.delegate = theDelegate;
imagePicker.mediaTypes = [NSArray arrayWithObjects:(NSString *)kUTTypeImage, nil];
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
UIView *controllerView = imagePickerController.view;
controllerView.alpha = 0.0;
controllerView.transform = CGAffineTransformMakeScale(0.5, 0.5);
[[[[UIApplication sharedApplication] delegate] window] addSubview:controllerView];
[UIView animateWithDuration:0.3
delay:0.0
options:UIViewAnimationOptionCurveLinear
animations:^{
controllerView.transform = CGAffineTransformMakeScale(1.0, 1.0);
controllerView.alpha = 1.0;
}
completion:nil
];
[imagePicker release];
}
余計なコードでごめんなさい!それが役に立てば幸い。