Skip to content

Instantly share code, notes, and snippets.

@khawajafarooq
Last active July 1, 2017 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khawajafarooq/c05e97710c1359b2da524471449a3bc8 to your computer and use it in GitHub Desktop.
Save khawajafarooq/c05e97710c1359b2da524471449a3bc8 to your computer and use it in GitHub Desktop.
class TimerTestViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
Timer.scheduledTimer(timeInterval: interval, target: self,
selector: #selector(ViewController.methodToRepeat(timer:)),
userInfo: nil, repeats: true)
}
@objc func methodToRepeat(timer : Timer) {
// code here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment