title: UIButton shadow and lighting effect (Swift 4)
body: <p>I'd like to add a lighting effect like these two buttons, a shadow on the bottom but also a lighted edge on top as if there were a light above it.</p>
  <p><a href="https://i.stack.imgur.com/JwefZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JwefZ.png" alt="enter image description here" /></a></p>
  <p>I've been experimenting with :</p>
  <pre><code>button.layer.shadowColor = UIColor.black.cgColor
  button.layer.shadowColor.layer.shadowOffset = CGSize(width: 2, height: 2)
  button.layer.shadowColor.layer.shadowRadius = 2
  button.layer.shadowColor.layer.shadowOpacity = 8
  button.layer.shadowColor.layer.masksToBounds = false
  </code></pre>
  <p>and get a nice shadow on the bottom, but how would I light up the top edge?</p>