2016-08-02 50 views
0

當我走在縱向模式下一切畫面精細,看起來像這樣:相機僅拍攝照片在縱向模式

enter image description here

在橫向模式下它是在錯誤的模式,並在90度左右旋轉。我該如何解決這個問題?
目前,它看起來像在畫廊。它甚至不被保存爲風景圖片。

enter image description here

回答

1

你需要從這樣一個UIImage的閱讀的方向:image.imageOrientation。然後相應地旋轉。

+0

哦謝謝,它會如何看待視頻?如果我使用AVPlayer? – mafioso

+0

不確定,可能是指這個問題? :) http://stackoverflow.com/questions/13243847/avfoundation-avplayer-rotation –

+0

不起作用,因爲我無法設置imageOrientation – mafioso

相關問題