basicPidTimer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(self.pidsUsage(indexPid:)), userInfo: pidsIndex, repeats: false)
//调用下面的方法但不触发任何帮助?
@objc func pidsUsage(indexPid : Int){
}
最佳答案
参数必须是Timer
类型。即
@objc func pidsUsage(timer : Timer) {
}
关于ios - 无法使用参数传递 Timer.sheduledTimer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50352615/