Home > DeveloperSection > Forums > Enabling Camera functionality using UIImagePickerController class
Linda Perla
Linda Perla

Total Post:13

Points:93
Posted on    November-05-2015 10:39 PM

 iPhone iPhone  Ios  Objective C 
Ratings:


 1 Reply(s)
 241  View(s)
Rate this:

I was creating an app and I want to implement functionality of camera in our app so I am  using UIImagePickerController to pick image using camera and it executes successfully.
But after clicking image I am unable to browse images.
I am new in iPhone so please help me.



Tarun Kumar

Total Post:210

Points:1614
Posted on    November-06-2015 10:16 PM

Your problem is not so big so don't worry, here I am giving you the code which helps you to pick image from library:

create an action method browseImage: and use this code

- (IBAction)browseImage:(id)sender {   

    UIImagePickerController *picker = [[UIImagePickerController alloc]init];

    picker.delegate = self;

    picker.allowsEditing = YES;

    picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

    [self presentViewController:picker animated:YES completion:NULL];

}


Don't want to miss updates? Please click the below button!

Follow MindStick