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