How to rotate UIImage

后端 未结 10 853
既然无缘
既然无缘 2021-01-03 23:03

I\'m developing an iOS app for iPad. Is there any way to rotate a UIImage 90º and then add it to a UIImageView? I\'ve tried a lot of different codes but none worked...

10条回答
  •  萌比男神i
    2021-01-04 00:01

    Another way of doing this would be to render the UIImage again using Core Graphics.

    Once you have the context, use CGContextRotateCTM.

    More info on this Apple Doc

提交回复
热议问题