Skip to content

An Xcode 10 project, written in Swift 4.2, demonstrating my best practices for using the Timer class.

License

Notifications You must be signed in to change notification settings

iosbrain/Swift-Timer-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift Timer Demo

An Xcode 10 project, written in Swift 4.2, demonstrating my best practices for using the Timer class.

In the companion tutorial, I'll discuss how developers often need to do something many times and at regular intervals. One common application of such a use case is checking some process's or device's status, a process of called "polling." In the tutorial, I'll show you how to use the Swift 4.2 Timer class in Xcode 10 to repeatedly perform a simple task, every second, for 1 minute (60 seconds) -- and update the user interface (UI) on each "tick." You'll learn how to start a timer ticking, pause it, resume it, stop it, and do something on each tick.

Here's on of my apps using a Timer to perform animations -- and the UI remains responsive:

alt text


Copyright (c) 2018 Andrew L. Jaffee, microIT Infrastructure, LLC, and iosbrain.com.

About

An Xcode 10 project, written in Swift 4.2, demonstrating my best practices for using the Timer class.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages