title: How to prevent selected UIButton from changing to normal image when touching down?
body: <p>I have two images for a UIButton. In its notmal state, it's a pencil. When I select it, it's a paper. But right when I <strong>touch down</strong> it shows the pencil even though I haven't selected it yet. How can I prevent this?</p>
  
  <pre><code>@IBOutlet weak var btn: UIButton!
  
  override func viewDidLoad() {
      super.viewDidLoad()
      btn.setImage(#imageLiteral(resourceName: "Pencil").withRenderingMode(.alwaysTemplate), for: .normal)
      btn.setImage(#imageLiteral(resourceName: "Paper").withRenderingMode(.alwaysTemplate), for: .selected)
      btn.tintColor = .cyan
  
      btn.addTarget(self, action: #selector(touchedButton), for: .touchUpInside)
  
  }
  
  func touchedButton() {
      if !btn.isSelected {
          btn.isSelected = true
  
      } else {
          btn.isSelected = false
          }
  
  
  
  }
  </code></pre>