Skip to content
An Xcode 10 project, written in Swift 4.2, demonstrating my best practices for using the Timer class.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Swift Timer Demo.xcodeproj
Swift Timer Demo
.gitignore
LICENSE.md
README.md

README.md

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.

You can’t perform that action at this time.