override func viewDidLoad() {
super.viewDidLoad()
// Swift block syntax (iOS 10+)
let timer = Timer(timeInterval: 0.4, repeats: true) { _ in print("Done!") }
// Swift >=3 selector syntax
let timer = Timer.scheduledTimer(timeInterval: 0.4, target: self, selector: #selector(self.update), userInfo: nil, repeats: true)
// Swift 2.2 selector syntax
let timer = NSTimer.scheduledTimerWithTimeInterval(0.4, target: self, selector: #selector(MyClass.update), userInfo: nil, repeats: true)
// Swift <2.2 selector syntax
let timer = NSTimer.scheduledTimerWithTimeInterval(0.4, target: self, selector: "update", userInfo: nil, repeats: true)
}
// must be internal or public.
@objc func update() {
// Something cool
}
Comments
Anonymous - Fri Mar 19 2021 11:58:03 GMT+0000 (UTC)
How to get current absolute URL in Ruby on Rails | thiscodeWorks <a href="http://www.g8z8yle6509xl65nv1u5tq67j0545nnqs.org/">ahsokoqfcrg</a> hsokoqfcrg http://www.g8z8yle6509xl65nv1u5tq67j0545nnqs.org/ [url=http://www.g8z8yle6509xl65nv1u5tq67j0545nnqs.org/]uhsokoqfcrg[/url]
Anonymous - Thu Mar 25 2021 07:41:09 GMT+0000 (UTC)
How to get current absolute URL in Ruby on Rails | thiscodeWorks seqwleelkv http://www.g1tce1e20678f5d4p07uzb129c6nb1pys.org/ <a href="http://www.g1tce1e20678f5d4p07uzb129c6nb1pys.org/">aseqwleelkv</a> [url=http://www.g1tce1e20678f5d4p07uzb129c6nb1pys.org/]useqwleelkv[/url]