I am designing an option bar on the navigation bar of my app, I want to achieve the same UI of that of the Music App, as you can see when the slider is sliding, the UILabel is partially changing its color, how does this be archived? Should I work on CALayer?
This is what I did so far, it's just not correct
UIView.animate(withDuration: 0.3, delay: 0, options: .curveEaseOut, animations: {
self.optionBarSlider.frame = self.selectedButton.frame
}) { _ in
self.selectedButton.setTitleColor(.black, for: .normal)
}