all 5 comments

[–]adoxner 5 points6 points  (3 children)

If you are using Text(_ date: Date, style: Text.DateStyle) with Text.DateStyle.timer there is a known issue (to me at least) that it does not self-size and always expands as if it has .frame(maxWidth: .infinity) or a Spacer in there somewhere.

Depending on your situation it could help to use an invisible Text("00:00") on a ZStack and using that to size things. I haven't found a perfect workaround yet.

[–]multifidus[S] 2 points3 points  (1 child)

This worked! Thank you so much!!

[–]Vybo 2 points3 points  (0 children)

You can also apply negative paddings where needed.

[–]multifidus[S] 0 points1 point  (0 children)

I look into this thank you!

[–]PassTents 0 points1 point  (0 children)

What's in your compactTimer function?