title: Change text color based on background color (e.g. in a progress bar)
body: <p>I find it difficult to describe what I want to achieve. I looked for a picture to show:</p>
  
  <p>(image link: <a href="https://d13yacurqjgara.cloudfront.net/users/7017/screenshots/351285/button.gif" rel="nofollow noreferrer">https://d13yacurqjgara.cloudfront.net/users/7017/screenshots/351285/button.gif</a>)
  <a href="https://i.stack.imgur.com/cNcFL.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cNcFL.gif" alt="enter image description here"></a></p>
  
  <p>You see that the text color of "3/4" changes to white when the bar reaches it. How can I achieve this with swift?</p>
  
  <p>My idea is to have two <code>UIViews</code>, with the exact same content (except for the text color) and blend one over the other by resizing a mask or something.
  The problem is that I would have to deal with duplicate content. If I wanted to change something, I would have to change it inside both <code>views</code>. Is there a more convenient way?</p>
  
  <p>Thank you!</p>