我有一个 View ,我会随着应用程序状态的变化而改变背景。基本上,我希望 View 背景更改以某种幻灯片形式进行动画处理。我一直在寻找解决方案,但还没有真正找到任何东西。
所以我想从当前背景过渡到下一个背景。
//current to:
self.view.backgroundColor = [UIColor colorWithPatternImage:image];
我可以毫不费力地改变背景,但我想为它制作动画。非常感谢您在正确方向上的任何帮助。
最佳答案
你可以使用这个:
[UIView animateWithDuration:1
delay:0
options:UIViewAnimationOptionAutoreverse
animations:^
{
self.view.backgroundColor = [UIColor colorWithPatternImage:image];
}
completion:nil
];
关于ios - 动画 View 背景更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15517273/