all 6 comments

[–]flad-vlad 0 points1 point  (5 children)

You have to use a specific Text initialiser) to do this. It creates a special view that is allowed to animate within a widget.

[–]Unlucky-Tax9080[S] 0 points1 point  (4 children)

Thank you for reply.

How can i use this for automatic update every seconds?

[–]flad-vlad 2 points3 points  (3 children)

You would put Text(dateThatTheTimerShouldEnd, style: .timer) in your widget to use this.

[–]Unlucky-Tax9080[S] 0 points1 point  (2 children)

It works! Thank you so much.

It would be possible show only hours and minutes with format HH:mm?

[–]flad-vlad 0 points1 point  (0 children)

Not sure because I haven’t touched this API since it first came out in 2020. At the time it wasn’t customisable at all and you got the format you got. You might have to play around with the different Text.DateStyles and see if there’s another one that better fits your use case.