1.Selector()
例:
let tap=UITapGestureRecognizer.init(target:selfvc , action: Selector(("tapClick:")))
2.#selector()
outbtn.addTarget(self, action: #selector(btnClick(_:)), for: UIControlEvents.touchUpInside)
1.Selector()
例:
let tap=UITapGestureRecognizer.init(target:selfvc , action: Selector(("tapClick:")))
2.#selector()
outbtn.addTarget(self, action: #selector(btnClick(_:)), for: UIControlEvents.touchUpInside)
转载于:https://www.cnblogs.com/chengenyan/p/6835818.html