NSTimer inside custom tableViewCell
问题 I'm activating a function in my custom cell class from a viewController. The custom cell class looks like this: import UIKit class TableViewCell: UITableViewCell { var counter = 10 class func timerStarted(){ var timer = NSTimer() timer = NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: "update", userInfo: nil, repeats: true) } class func update(){ let cell = TableViewCell() var count = cell.counter count = --count println(counter) } } The problem is that the variable counter