PHAsset get original file name

后端 未结 4 1140

I wonder if there any way to get the original file name using PHAsset?

I use the following code to extract the file info.

   [[PHImageManager defaultMa         


        
4条回答
  •  野性不改
    2021-01-31 20:33

    Short way to get file name with one line of code. Asset have a property for accessing file name.

     NSString*FileName=[asset valueForKey:@"filename"];
     NSLog(@"File name %@",FileName);
    
    Its done.
    
    Note: Accepted answer takes lots of time to load a phasset but it works.
    

提交回复
热议问题