title: UIView animate not working on UIView's layers
body: <p>I simply want to flash a red border around a UIView then fade out to clear, repeatedly. However, the UIView animate method doesn't seem to work.</p>
  <p>Is there something special about the layer that prevent UIView animate from working?</p>
  <pre><code>public class MyAlertView: UIView {
  
      convenience init(args: [String]) {
          self.init(frame: CGRect.zero)
      }
      
      override init(frame: CGRect) {
          super.init(frame: frame)
          commonInit()
      }
      
      required init?(coder aDecoder: NSCoder) {
          super.init(coder: aDecoder)
          commonInit()
      }
  
      private func commonInit() {
          self.translatesAutoresizingMaskIntoConstraints = false
          
          self.layer.cornerRadius = 10
          
          self.layer.borderColor = UIColor.systemRed.cgColor
          self.layer.borderWidth = 2.5
          
          UIView.animate(withDuration: 0.5, delay: 0.0, options: [.curveEaseInOut, .repeat, .autoreverse], animations: {
              self.layer.borderColor = UIColor.clear.cgColor
          })
  
      }
  }
  </code></pre>