In Live Activity, SwittUI Text(timerInterval) takes entire space instead of just wrapping contents

Here you can see, we add Spacer in the bottom HStack, but the timer Text still expands and takes up all the horizontal space. There’s a discussion, but no one has the solution.

  • try add a spacer() after "mins left to add"

  • Added, and even set the Text(timerInterval)'s layout priority to a lower value. None of them works.

Add a Comment

Replies

You can use

Text("Only \(Text(endDate, style: .timer)) mins left to add")
    .monospacedDigit()