1

i am using TLPhotoPicker for select multiple image and video and everything works fine expect one thing after selecting images from picker its stored in an array which has type TLPHAsset

var selectedAssets = [TLPHAsset]()

and after store all images in this array i am populating CollectionView from this array till then every thing works fine.

Now i am using PhotoEditor for edit image

https://github.com/eventtus/photo-editor

so when i on didSelect of collectionview i am getting image and i pass that image to PhotoEditor and then after editing photo on delegate Method i get edited image as UIImage.

Now i want to inset that edited image to selectedAssets array but when i tried to insert i got below error

self.selectedAssets.insert(image, at: 0) //Cannot convert value of type 'UIImage' to expected argument type 'TLPHAsset'

so can anyone please tell me how to solve this is there any way to convert UIImage to TLPHAsset

0 Answers0