How to convert PHAsset to UIImage in Objective-C

后端 未结 4 2091
野的像风
野的像风 2021-01-31 21:37

I have an array filled with PHAsset objects (https://developer.apple.com/library/prerelease/ios/documentation/Photos/Reference/PHAsset_Class/index.html), and I want

4条回答
  •  一个人的身影
    2021-01-31 22:01

    image may be nil(seldom). It's better to evaluate, otherwise array add nil will crash app.

    if(image){
        ima = image;
        [images addObject:ima];
    }
    

提交回复
热议问题