开发者

How to extend UIImagePickerController with a custom view controller?

开发者 https://www.devze.com 2023-01-07 15:46 出处:网络
Because the default cropping frame of an UIImagePickerController (when using the setting setAllowsEditing:YES) isn\'t the right size for me I\'ve created a custom view controller, like suggested here.

Because the default cropping frame of an UIImagePickerController (when using the setting setAllowsEditing:YES) isn't the right size for me I've created a custom view controller, like suggested here.

When a thumbnail is selected from the UIImagePickerController I open this custom view controller (navigationController) from - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info:

[popoverController setContentViewController:navigationController animated:YES];

But it seems that the UIImagePickerController is already closed, because the custom view controller is presented without animation. And when I cancel the custom view controller I can't go back to the UIImagePickerController's thumbnail view. Is there a way to extend the UIImagePickerController so开发者_运维技巧 you return to the UIImagePickerController when canceling the custom view controller?

Thanks!


UIImagePickerController is a UINavigationController. That means you can push and pop things onto the stack all you want. Instead of setting a new view controller, just push your controller onto the image picker stack.

0

精彩评论

暂无评论...
验证码 换一张
取 消