Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding WKInterfaceTimer to SwiftUI

How to add WKInterfaceTimer to SwiftUI ? Anyone who already did it ? There is no init for WKInterfaceTimer how to do it ?

like image 961
Bogdan Bogdanov Avatar asked Jul 05 '26 00:07

Bogdan Bogdanov


1 Answers

Please try:

Text(date, style: .timer)

The style .timer ensures that the text will be updated automatically.

Please note: This feature has been added to iOS 14 and watchOS 7.

like image 103
JanR Avatar answered Jul 06 '26 18:07

JanR



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!