title: Swift playgrounds UIButton not working correctly
body: <p>I've got this UIButton called 'start button' in swift playgrounds. This is the setup for it.</p>
  
  <pre><code>    func setupStartButton() {
          startButton.frame = CGRect(x: 15, y: 550, width: 125, height: 50)
          startButton.backgroundColor = UIColor(ciColor: CIColor(red: 255/255, green: 0/255, blue: 77/255, alpha: 1.0))
          startButton.layer.cornerRadius = 20
          startButton.setTitle("Start", for: .normal)
          startButton.setTitleColor(.white, for: .normal)
          startButton.addTarget(self, action: #selector(startButtonTapped), for: .touchUpInside)
          view.addSubview(startButton)
  </code></pre>
  
  <p>I call this in viewDidLoad().  </p>
  
  <pre><code>    override func viewDidLoad() {
          view.frame = CGRect(x: 0, y: 0, width: 524, height: 766)
          view.backgroundColor = .white
  
          setupStartButton()
  
          PlaygroundPage.current.liveView = view
          PlaygroundPage.current.needsIndefiniteExecution = true
      }
  
  </code></pre>
  
  <p>But when I tap on a button it doesn't run the function called 'startButtonTapped' which just prints "Hello" to the console.  </p>
  
  <p>This is the function 'startButtonTapped'.</p>
  
  <pre><code>    @objc func startButtonTapped() {
          print("Hello")
      }
  
  </code></pre>
  
  <p>Why does it not do anything when I tap the button?
  How can I fix this?<br>
  Thank you</p>