Convert UIImage to NSData and save with core data

前端 未结 8 772
不知归路
不知归路 2021-01-30 18:43

I have a UIImageView whose image gets set via UIImagePicker

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPi         


        
8条回答
  •  抹茶落季
    2021-01-30 18:50

    On Mac OS you can let Core Data handle this for you by ticking the Transformable box on the attribute in the model, not selecting a specific transformer, and assigning the UIImage directly to the property.

    I'm not sure if it works on iOS but it might be worth a try.

提交回复
热议问题