In the image file path you will get the url of asset, and you can use that asset url to display the image on image view.
First import
#import <AssetsLibrary/AssetsLibrary.h>
in you project, then in the delegate method of UIImagePicker
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
// You will get the image url like this
NSURL *imageURL = [info valueForKey:UIImagePickerControllerReferenceURL];
}
Now to display the image, use this code
ALAssetsLibraryAssetForURLResultBlock resultblock = ^(ALAsset *myasset) {
ALAssetRepresentation *rep = [myasset defaultRepresentation];
CGImageRef iref = [rep fullResolutionImage];
if (iref) {
//here you get the image
largeimage = [UIImage imageWithCGImage:iref];
}
};
ALAssetsLibrary* assetslibrary = [[ALAssetsLibrary alloc] init];
[assetslibrary assetForURL:imageURL
resultBlock:resultblock
failureBlock:nil];
If you directly want to access the image then use this
UIImage* myImage=(UIImage*)[info objectForKey:@"UIImagePickerControllerOriginalImage"];