objective-c - How to query key
伊谢尔伦
伊谢尔伦 2017-05-02 09:35:40
0
2
696

PHFetchResult * reuslt = [PHAsset fetchAssetsWithOptions:nil];

[reuslt enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
    
    PHAsset * imageT = (PHAsset *)obj;
    
    if (imageT.mediaType == PHAssetMediaTypeImage ) {
        
       NSLog(@"照片名%@", [imageT valueForKey:@"filename"]);
    }
    
    NSLog(@"======%@",obj);
}];

As shown in the above code, where can I find the key string behind valueForKey? I will check in the document to see if there is no key for this filename

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(2)
phpcn_u1582

http://chipmuck.pub/2016/09/2...

Regarding the use of PhotoKit, this article may solve your problem.

小葫芦

filename is a private attribute, of course the document does not have it

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template