How to obtain the original file name of the image picked by UIImagePickerController?

前端 未结 2 1066
清酒与你
清酒与你 2021-01-21 20:17

I\'ve implemented the delegate method and can get access to the picked UIImage, like this:

- (void)imagePickerController:(UIImagePickerController *)picker didFin         


        
2条回答
  •  自闭症患者
    2021-01-21 20:52

    You could use the UIImagePickerControllerReferenceURL value of the info dictionary instead of the UIImagePickerControllerOriginalImage. This should give you the URL to the original media item.

    This would return you a NSURL object which you then can use to build your new filename from.

提交回复
热议问题