Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

newtoiphonesdk

macrumors 6502a
Original poster
Jul 30, 2010
567
2
I have the following code that I use to either choose a picture or take one with the camera on the iPhone.
Code:
-(IBAction) getphoto:(id) sender {
	UIImagePickerController *picker = [[UIImagePickerController alloc] init];
	picker.delegate = self;
	
	if((UIButton *) sender == choosephoto) {
		picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
	} else {
		picker.sourceType = UIImagePickerControllerSourceTypeCamera;
	}
	
	[self presentModalViewController:picker animated:YES];
}
The only issue I have is that it will only give me access to items in the camera roll, and not other events that were synced to the iPhone. Is there a way I can set it to choose any photo on the phone?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.