I have a problem with timer setting.
The code I wrote for it is:
import UIKit class ViewController: UIViewController { @IBOutlet weak var label: UILabel! override func viewDidLoad() { super.viewDidLoad() Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: Selector(("updateTimer")), userInfo: nil, repeats: true) } func updateTimer(){ label.text = DateFormatter.localizedString(from: NSDate() as Date, dateStyle: DateFormatter.Style.short, timeStyle: DateFormatter.Style.short) } } I run the app, and instead of timer I get an error of type Thread. Something like:
"Thread 1: signal SIGBART"
What could be the problem?