I need to delete the spaces between two text()

this is my code

 HStack {
          Text("\(fitnessData.Progress)/")
          Text("2000 KCAL")
                    }

can any one say how to delete the spaces between 200/_ 2000KCAL

Accepted Reply

You can either:

  • set HStack spacing to 0:
        HStack(spacing: 0) {
  • or remove the HStack and replace with
          Text("\(fitnessData.Progress)/2000 KCAL")

Replies

You can either:

  • set HStack spacing to 0:
        HStack(spacing: 0) {
  • or remove the HStack and replace with
          Text("\(fitnessData.Progress)/2000 KCAL")

Thank You