selector 在传参使用的时候,花费了我很多的时间,确定切实可用的形式是:self.button?.addTarget(self, action: #selector(play(sender:)), for: .touchUpInside),并且特别注意 sender: 参数必须和实际函数中的一致。
转载于:https://www.cnblogs.com/lynnnet/p/7429603.html
selector 在传参使用的时候,花费了我很多的时间,确定切实可用的形式是:self.button?.addTarget(self, action: #selector(play(sender:)), for: .touchUpInside),并且特别注意 sender: 参数必须和实际函数中的一致。
转载于:https://www.cnblogs.com/lynnnet/p/7429603.html