• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
iPad: UIImagePickerController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iPad: UIImagePickerController


  • Subject: iPad: UIImagePickerController
  • From: Development <email@hidden>
  • Date: Wed, 7 Apr 2010 13:37:35 -0700

How do you use the image picker controller on the iPad? My iphone version works fine but I get a UI Mess on the iPad. (Part of the nav bar loads and nothing else.) Anyway so I tried
	if ([[[UIDevice currentDevice]model]containsString:@"iPad"]){
		if( [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary ] ||
		   [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeSavedPhotosAlbum ])
		{

			mainPicker = [[UIImagePickerController alloc] init];
			NSLog(@"Picker %@",mainPicker);
			mainPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary & UIImagePickerControllerSourceTypeSavedPhotosAlbum;

			mainPicker.delegate = self;

			mainPicker.allowsImageEditing = YES;
			[[UIApplication sharedApplication]setStatusBarOrientation:UIInterfaceOrientationPortrait animated:YES];

			[delegate slideSubview:pickerParent fromTop:YES];
			[self presentModalViewController:mainPicker animated:YES];
		}
	}


And now it crashes telling me I have to use a popover:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'On iPad, UIImagePickerController must be presented via UIPopoverController'


Are the any examples of how to present a UIImagePicker on the iPad?_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: iPad: UIImagePickerController
      • From: Luke the Hiesterman <email@hidden>
    • Re: iPad: UIImagePickerController
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: multiple-page print support in NSView
  • Next by Date: Re: iPad: UIImagePickerController
  • Previous by thread: Re: copy/paste in modal window
  • Next by thread: Re: iPad: UIImagePickerController
  • Index(es):
    • Date
    • Thread