1

This code is copy by standford CS193P About GestureRecognizier The code is:

var faceView: FaceView! {
   didSet {
      let handler = #selector(FaceView.changeScale(_:))  //*wrong is here*
      let pinchRecognizer = UIPinchGestureRecognizer(target: faceView, action: handler)   
   }
      faceView.addGestureRecognizer(pinchRecognizer)
}

The changeScale is be definited.

The quesiton is Xcode can not compiled and says the #selector is not exposed to Objective-c

ManlinUp
  • 31
  • 1
  • 3

0 Answers0