UIGestureRecognizers not invoked on Xcode (8.3) Playgrounds

Originator:ZntFdr
Number:rdar://31387021 Date Originated:2017/04/01
Status:Open Resolved:No
Product:iOS + SDK Product Version:Xcode 8.3
Classification:UI/Usability Reproducible:Always
 
Summary:
As discussed here https://forums.developer.apple.com/thread/74872 , on Xcode 8.3 the playgrounds don't detect any kind of gestures (swipes, taps etc)

Steps to Reproduce:
1. Open attached Xcode playground 
2. Open Assistant Editor
3. Run the playground
4. Tap/click on the view on the Assistant Editor

Expected Results:
The Tap Gesture Recognizer to be called (in this case the recognizer would just print "tap" on the console)

Actual Results:
The Tap Gesture recognizer is not called (works fine on Xcode 8.0)

Version:
Xcode 8.3

Configuration:
MacBook Pro (13-inch, Mid 2012) non retina

###
This is the playground that I've attached:

import UIKit
import PlaygroundSupport

class ViewController: UIViewController {
  override func viewDidLoad() {
    super.viewDidLoad()
    view.backgroundColor = .white
    
    let gesture = UITapGestureRecognizer(target: self, action: #selector(tapHandler))
    view.addGestureRecognizer(gesture)
  }
  
  func tapHandler() {
    print("tap")
  }
}

let controller = ViewController()
PlaygroundPage.current.liveView = controller

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!