22 Jan 2021 swiftui timer combine onreceive publisher tick interval cancel
Reading time: 1 min
This recipe shows how to implement a timer in SwiftUI in order to update the UI state at a specific interval.
There are two ways of going about it:
- The simple one, with
- A bit more complex, but also more powerful one, using
Direct updates with onReceiv...
Search our recipes!
Have a recipe for us?
Get in touch and let's grow the cookbook together!