猿问

UIImageView怎么设置点击事件ios,swift?

let tapStepGestureRecognizer = UITapGestureRecognizer(target: self, action: Selector("enterStepDetail"))

stepLogo.addGestureRecognizer(tapStepGestureRecognizer)


 func enterStepDetail(){

    print("step detail ok")

 }

//我现在的代码,但是下面的方法不执行。


LEATH
浏览 1525回答 2
2回答
随时随地看视频慕课网APP
我要回答