AGImagePickerController *imagePickerController = [[AGImagePickerController alloc] initWithFailureBlock:^(NSError *error) {
if (error == nil)
{
NSLog(@"User has cancelled.");
[self dismissModalViewControllerAnimated:YES];
} else
{
NSLog(@"Error: %@", error);
// Wait for the view controller to show first and hide it after that
double delayInSeconds = 0.5;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
[self dismissModalViewControllerAnimated:YES];
});
}
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:YES];
} andSuccessBlock:^(NSArray *info) {
NSLog(@"Info: %@", info);
[self dismissModalViewControllerAnimated:YES];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:YES];
}];
popover = [[UIPopoverController alloc] initWithContentViewController:imagePickerController];
[popover presentPopoverFromRect:CGRectMake(0.0, 0.0, 400.0, 400.0)
inView:self.view.window
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
能够提交,但是,即使我改变它的大小还是一样的,当我按下按钮DONE
,它消除了我的视图控制器不是imagepicker。请帮助。我把它放在popover中,因为我认为这就是为什么它放慢速度,因为imagepicker应该与iPad的popover一起出现。图像拾取酥料饼
我需要改变框架的弹出框 – Bazinga 2012-07-12 03:28:08
我想你的意思是内容框架? 'setPopoverContentSize:animated:'或者你可以改变属性'popoverController.contentSize = CGSizeMake(width,height)'[UIPopoverController Class Reference](http://developer.apple.com/library/ios/#documentation/uikit/reference /UIPopoverController_class/Reference/Reference.html) – ohr 2012-07-12 03:33:26