更新时间:2022-12-21 11:21:08
有一个类别由Hardy Macia实施:
There is a category implemented by Hardy Macia at:
http ://www.catamount.com/forums/viewtopic.php?f = 21& t = 967
它在UIImage上有很多类别。
你想要使用的是:
It has a bunch of categories on UIImage. The one you want to be using is:
UIimage* newImage = [imageToBeRotated imageRotatedByDegrees:90.0];
您的角度取决于您设备的当前方向。
使用:
Your angle will depend on the current orientation of your device. Use:
[[UIApplication sharedApplication] statusBarOrientation]
获取设备的方向。
希望这会有所帮助。