I want to get the name of the image picked from the library or newly clicked in -
-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
I am using this code:
-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeSavedPhotosAlbum])
{
AppDelegate *del = [[UIApplication sharedApplication]delegate];
[self dismissModalViewControllerAnimated:YES];
image = [info objectForKey:UIImagePickerControllerOriginalImage];
NSLog(@"imagekbgfg=====>%@",image);
[self.imageView setImage:image];
imgName = [info objectForKey:UIImagePickerControllerOriginalImage];
del.mainImgName = imgName;
del.imageData = UIImageJPEGRepresentation(image, 1.0);
del.imageApp = image;
}
if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera])
{
image = [info objectForKey:UIImagePickerControllerOriginalImage];
}
}
How can I do this?