当用户从照片中选择图像时,如何从所选图像中获取日期和时间。请提前感谢!
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
//dismiss imagepicker controller
[self dismissViewControllerAnimated:NO completion:nil];
}
答案 0 :(得分:1)
试试这个:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
NSDictionary *metadataDictionary = (NSDictionary *)[info valueForKey:UIImagePickerControllerMediaMetadata];
// do something with the metadata
NSLog(@"meta : %@ \n\n",metadataDictionary);
}