Swift: Using Selectors with Multiple Arguments
问题 I'm trying to keep an NSTimer in the model of my application and update the time in my view controller file. To do this I created these two methods: func startTimer(labelToUpdate : UILabel) { timerGoing = true timer = NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: "decTimeByOne:labelToUpdate:", userInfo: labelToUpdate, repeats: true) } func decTimeByOne(labelToUpdate : UILabel) { if timerGoing { if decreasingTime > 0 { decreasingTime--; labelToUpdate.text = "\