• 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
Re: iPad: UIImagePickerController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iPad: UIImagePickerController


  • Subject: Re: iPad: UIImagePickerController
  • From: Luke the Hiesterman <email@hidden>
  • Date: Wed, 7 Apr 2010 13:45:03 -0700

On Apr 7, 2010, at 1:37 PM, Development wrote:

> 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"]){

No. Don't do this. If you want to check for iPad, use if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomiPad). There's also a convenience macro included in UIDevice.h intended for people deploying on pre-3.2 versions of the OS so you won't crash on unknown selector.
>
> 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?_______________________________________________
>

Create a popover, add the picker as the content view controller....viola.

Luke_______________________________________________

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

References: 
 >iPad: UIImagePickerController (From: Development <email@hidden>)

  • Prev by Date: Re: iPad: UIImagePickerController
  • Next by Date: Re: exceptions when NSTextStorage initialized with empty string
  • Previous by thread: Re: iPad: UIImagePickerController
  • Next by thread: How to subclass UIButton?
  • Index(es):
    • Date
    • Thread