title: SwiftUI - How to make a vertical dotted line using Shape?
body: <pre><code>struct DottedLine: Shape {
          
      func path(in rect: CGRect) -&gt; Path {
          var path = Path()
          path.move(to: CGPoint(x: 0, y: 0))
          path.addLine(to: CGPoint(x: rect.width, y: 0))
          return path
      }
  }
  
  DottedLine()
                  .stroke(style: StrokeStyle(lineWidth: 1, dash: [2]))
                  .frame(height: 1)
                  .foregroundColor(Color.red)
  </code></pre>
  <p>This will create a horizontal dotted line. But how to make it vertical ? If I put Divider() in HStack then it become vertical but how to achieve the same with Dotted line ?</p>