I want to save rotated image data to CoreData and show the rotated image to UIImageView. But my problem is that I am storing image data to CoreData and when to fetch and to display the data to imageView is showing the original image(Without rotate). Below is the code I am using for storing data to CoreData.
if let imageData = imagePicked.image?.jpegData(compressionQuality: 100) {
CoreDataBaseHelper.shareInstance.saveImage(data: imageData, imageID: arr.count)
}
And below is the code for showing fetched data.
addCell.roomIconImage.image = UIImage(data: fetchedData[indexPath.row].image!)
Can you please help me to save the rotated image to CoreData and show the image.