I have 2 views. One is TableView with custom cells (image and label) and second is adding data. I implemented taking pictures/choosing one from a library. If the image is longer than wider TableView automatically rotates it by 90 degrees.
I never encountered with this issue, any ideas what's causing it?
This is how I save images:
func saveImageAndCreatePath(image: UIImage) -> String {
let imgData = UIImagePNGRepresentation(image)
let imgPath = "image\(NSDate.timeIntervalSinceReferenceDate()).png"
let fullPath = documentsPathforFileName(imgPath)
imgData?.writeToFile(fullPath, atomically: true)
return imgPath
}