gpt4 book ai didi

ios - 为什么旋转 UIImageView 会影响其他 UI 元素?

转载 作者:行者123 更新时间:2023-11-29 13:11:08 24 4
gpt4 key购买 nike

我通过使用以下方法旋转 UIImageView 为我的应用添加背景效果:

- (void) viewDidLoad {
rotateAngle = 0;
[NSTimer scheduledTimerWithTimeInterval:.05 target:self selector:@selector(bgEffect) userInfo:nil repeats:YES];
}

- (void) bgEffect{
rotateAngle += .01;
CGAffineTransform rotate = CGAffineTransformMakeRotation( rotateAngle );
[_bgImage setTransform:rotate];
}

奇怪的问题是它会通过移动影响我的一些 UI 元素。它不会影响所有 UI 元素,只会影响一些。我试图改变层次结构,但没有运气。我不明白问题出在哪里。有人能帮我吗?

最佳答案

尝试在 Storyboard中关闭自动布局。

关于ios - 为什么旋转 UIImageView 会影响其他 UI 元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17349097/

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