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

Alhazred

macrumors member
Original poster
Jul 5, 2011
35
0
My application allows users to fill a form and send those data to a php application by http.
At the moment is only possible to send texts, now I need to allow users to select an image stored on the iPhone and send it together with the form's data.

What do I need to use?
 
I'm trying this to pick the image
Code:
- (IBAction)getPicture:(id)sender {
	UIImagePickerController *imagePicker = [[UIImagePickerController alloc] initWithRootViewController:self];
	imagePicker.delegate = self;

	UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:imagePicker];
	
	[imagePicker release];
	
	[popover presentPopoverFromBarButtonItem:sender 
		 permittedArrowDirections:UIPopoverArrowDirectionAny 
		animated:YES];
}
but I get these runtime errors
- UIStatusBarStyleBlackTranslucent is not available on this device
- On iPad, UIImagePickerController must be presented via UIPopoverController

What's wrong?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.