0

I've achieved the functionality of changing text on a UILabel and applying styling to particular characters in a subset of a string used for that attributed text, for example on a string $0.00, I can change the alpha of only the ending '00' when the user has only typed '0.'

However, I'd like to then animate the letters as the come in. CashApp (reference) does something a bit similar to this... how can I smoothly animate only the text which is added to the label and not the entire label itself??

  • "I'd like to then animate the letters as the come in." What sort of animation? Without describing what you are after we can't tell you how to do it. (I've never used CashApp, so your vague "does something a bit similar" isn't helpful.) Even for those familiar with CashApp, how are we supposed to know what animation you have in mind that is "a bit similar" to some other animation? – Duncan C Apr 23 '22 at 20:04
  • As described in [this thread](https://stackoverflow.com/a/63018498/205185) just put your changes to the label's attributedText property inside a call to `UIView.transition()`. – Duncan C Apr 23 '22 at 20:06
  • This animates the entire label rather than ONLY the text added. –  Apr 23 '22 at 20:21
  • Thank you for the advice/critique. I appreciate it. I admit that was a bit lazy in addition to my lacking ability to describe what it does precisely. Animations are borderline magic -- it seems to come from no where lol. –  Apr 23 '22 at 20:23

0 Answers0