how can i add multiple image in my application.

Discussion in 'iOS Programming' started by hrithik123, Jun 17, 2011.

  1. hrithik123 macrumors member

    Joined:
    Feb 3, 2010
    #1
    i want to add multiple image in my application.

    user can select from camera and photo album

    but user should be add multiple image as much they like

    can anypne please guide me.
     
  2. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    I have no idea what your question actually is now.
    You want the client to add pictures to the app. from the photoalbum and the camera. and as much as they like, i don't see the problem..
    There is code for that from standard developer.apple.com
     
  3. hrithik123 thread starter macrumors member

    Joined:
    Feb 3, 2010
    #3
    yes i need this

    can you please help me?
     
  4. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #4
    Ever thought of just googling to what u want?

    Code:
     if ([UIImagePickerController isSourceTypeAvailable:SOURCETYPE]) {
            // Create image picker controller
            UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
            // Set source to the camera
            imagePicker.sourceType =  UIImagePickerControllerSourceTypeCamera;
            // Delegate is self
            imagePicker.delegate = self;
            // Show image picker
            [self presentModalViewController:imagePicker animated:YES];
        } else {
            UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Sorry" message:@"Your device has no camera avaiable" delegate:self cancelButtonTitle:nil otherButtonTitles:@"Ok", nil];
            [alert show];
            [alert release];
        }
    
    That should set you on the way (the sourceType) can be changed to the photo album too.

    Rest of the methods u have to find on yourself (i already added it once to this forum.)
     

Share This Page