To do this, you need to create and present UIImagePickerControlleras follows:
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.allowsEditing = YES;
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:imagePicker animated:YES];
You can change imagePicker.sourceTypeto imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;if you want the user to use the camera.
Delegate Method: - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)infoProvide you with an image in a dictionary info.
source
share