How to get a NSDATE from UIImage?

大城市里の小女人 提交于 2019-12-01 00:36:24
Greg

If you are referring to EXIF metadata in the image (which includes date information), you can see this question for information on how to access it:

How to access photo EXIF in pictures taken from camera in iOS 4.0+?

The info dictionary contains a key called "UIImagePickerControllerMediaMetadata" which is another dictionary. Just NSLog allKeys of that to get the date key.

NSDictionary *metadata = [info objectForKey: UIImagePickerControllerMediaMetadata];
NSLog(@"%@",metadata);

Choose what you need from metadata.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!