【发布时间】:2021-02-16 07:36:54
【问题描述】:
我正在我的应用导航栏上设计一个选项栏,我想实现与音乐应用相同的UI,正如你所看到的,当滑块滑动时,UILabel正在部分改变它的颜色,如何这会存档吗?我应该在 CALayer 上工作吗?
这是我到目前为止所做的,只是不正确
UIView.animate(withDuration: 0.3, delay: 0, options: .curveEaseOut, animations: {
self.optionBarSlider.frame = self.selectedButton.frame
}) { _ in
self.selectedButton.setTitleColor(.black, for: .normal)
}
【问题讨论】: