2016-08-02 51 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

相关问题