Swift如何使用#selector发送参数

时间:2017-07-30 18:46:15

标签: swift

我有这个快速的代码

let z=0;
var tap = UITapGestureRecognizer(target: self, action: #selector(changeTabs(el:z)))
v.addGestureRecognizer(tap)

但是这段代码给了我一个错误

Instance member 'changeTabs' cannot be used on type 'HomePage'; did you mean to use a value of this type instead?

如何在Swift 4中通过选择器发送参数?

0 个答案:

没有答案