Select and send images

Discussion in 'iOS Programming' started by Alhazred, Aug 18, 2011.

  1. Alhazred macrumors member

    Joined:
    Jul 5, 2011
    #1
    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?
     
  2. Alhazred thread starter macrumors member

    Joined:
    Jul 5, 2011
    #2
    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?
     

Share This Page