问题描述
我使用的是 Xcode 12.4 故事板。我想使用抖动动作来改变背景颜色。使用下面的代码可以工作。但是当我再次摇晃它时,我希望 Xcode 继续使用最新选择的背景色并使用选择的用户设置(最新的 TextInput、选择的字体大小、选择的图片)
这是我的代码:
self.view.backgroundColor = .red
UIView.animateKeyframes(withDuration: 0.8,delay: 0,options: [.repeat,.autoreverse],animations: {
self.view.backgroundColor = .white
// self.customButton.backgroundColor = .none
},completion: nil)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)