WidgetKit looks great, I love that it's SwiftUI and lightweight. I'm just trying to see if I understood everything correctly by using an example: Widgets are not mini apps, but really "freeze-dried" SwiftUI view hierarchies that are then "thawed out" by the system as needed.
That being the case, a developer could not build a "countdown" or "timer" widget that would show a label with the current, accurate-to-the-second value of the countdown or timer, correct?
While I could imagine that to be a real-world use-case, I do understand that the home screen should not have a lot of things animating and moving, but to be "calm".
That being the case, a developer could not build a "countdown" or "timer" widget that would show a label with the current, accurate-to-the-second value of the countdown or timer, correct?
While I could imagine that to be a real-world use-case, I do understand that the home screen should not have a lot of things animating and moving, but to be "calm".
You can use SwiftUI's new Text initializer to display the relative time to a certain timestamp. For more information you can checkout: https://developer.apple.com/documentation/swiftui/text/init(_:style:)
This Text view updates automatically without you needing to provide new entries for every second.
This Text view updates automatically without you needing to provide new entries for every second.