gpt4 book ai didi

ios - 像标准功能 ios objective c 中那样旋转图像

转载 作者:行者123 更新时间:2023-11-28 21:11:20 24 4
gpt4 key购买 nike

如何像在标准图库功能中那样旋转图像?标准画廊有滚轮,用户可以用一根手指点击滚轮,然后从左向右滑动并将图像旋转 45 度。这是我的意思的屏幕截图:

最佳答案

尝试使用此代码进行轮换。

CGAffineTransform newTransform = CGAffineTransformMakeRotation((CGFloat)(angel));

self.imageView.transform = newTransform;

关于ios - 像标准功能 ios objective c 中那样旋转图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43067757/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com