swift3.0 点击事件两种方式

1.Selector()

例:

 let tap=UITapGestureRecognizer.init(target:selfvc , action: Selector(("tapClick:")))

2.#selector()

   outbtn.addTarget(self, action: #selector(btnClick(_:)), for: UIControlEvents.touchUpInside)

 

posted @ 2017-05-10 14:31  程恩艳_ios  阅读(2498)  评论(0编辑  收藏  举报