title: How to control the speed of animation in Swift using curveEaseInOut or Keyframes?
body: <p>Using Swift 3, I am animating several UILabels 'sliding' them from right to left.
  The labels are of varying lengths.</p>
  
  <p>I'm trying to get their speed to appear the same regardless of the length.</p>
  
  <p>I'm using this code but which does not really give me the visual effect I need because I can only change the duration for each label based on length and nature of the curve doesn't really account for this:</p>
  
  <pre><code>        UIView.animate(withDuration: 5.0, delay: 5.0, usingSpringWithDamping: 0.9, initialSpringVelocity: 0.0, options: [.curveEaseInOut,.repeat], animations: {
              self.Label_1.frame.origin.x = -self.Label_1.frame.width
          }, completion: nil)
  
          UIView.animate(withDuration: 10.0, delay: 5.0, usingSpringWithDamping: 0.9, initialSpringVelocity: 0.0, options: [.curveEaseInOut,.repeat], animations: {
              self.Label_2.frame.origin.x = -self.Label_2.frame.width
          }, completion: nil)
  </code></pre>
  
  <p>What happens is the animation speeds up until the midpoint then slows down. It appears to me that the curveEaseInOut motion curve does not account for a period of constant speed between the 'eases'. This terrible graphic I've drawn should help:</p>
  
  <p><a href="https://i.stack.imgur.com/w6T6m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w6T6m.png" alt="enter image description here"></a></p>
  
  <p>1) shows the apparent visual nature of the curve - where the ease-in and ease-out transition without any constant speed in between whereas
  2) shows what I am trying to achieve.</p>
  
  <p>With 2) I could specify the length in time of the ease-in, the ease-out, and the constant speed between.</p>
  
  <p>How can I achieve the effect I'm after?</p>