Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-15-2010, 05:28 PM   #1 (permalink)
Registered Member
 
wilky94's Avatar
 
Join Date: Dec 2009
Location: Seaham UK
Age: 17
Posts: 257
wilky94 is on a distinguished road
Send a message via AIM to wilky94 Send a message via Skype™ to wilky94
Default UIImagePicker iPad?

Hi, I am currently making an iPad app and need to use an imagepicker. i used this code in an iPhone app I made to start the picker.
Code:
	UIImagePickerController *picker = [[UIImagePickerController alloc] init];
	picker.delegate = self;
	picker.allowsEditing = YES;
	picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
	[self presentModalViewController:picker animated:YES];
	[picker release];
However every time I try to launch it the app crashes.
Can anyone help?
wilky94 is offline   Reply With Quote
Old 08-15-2010, 08:13 PM   #2 (permalink)
Registered Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
smasher will become famous soon enough
Default

Crashes with what message? I believe that you have to show UIImagePicker in a popover on the iPad; it will not load as a modal.
__________________

Free Games!
smasher is offline   Reply With Quote
Old 08-16-2010, 01:13 PM   #3 (permalink)
Registered Member
 
wilky94's Avatar
 
Join Date: Dec 2009
Location: Seaham UK
Age: 17
Posts: 257
wilky94 is on a distinguished road
Send a message via AIM to wilky94 Send a message via Skype™ to wilky94
Default

Quote:
Originally Posted by smasher View Post
Crashes with what message? I believe that you have to show UIImagePicker in a popover on the iPad; it will not load as a modal.
Your right
Quote:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'On iPad, UIImagePickerController must be presented via UIPopoverController'
Do you know where I can find out how to use the popover controller
wilky94 is offline   Reply With Quote
Old 08-16-2010, 06:46 PM   #4 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 580
ChrisL is on a distinguished road
Default

Quote:
Originally Posted by wilky94 View Post
Do you know where I can find out how to use the popover controller
Try the iPad Programming Guide.
ChrisL is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 348
5 members and 343 guests
bignoggins, Chickenrig, givensur, linkmx, PlutoPrime
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,118
Posts: 402,894
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:45 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0