👔HLine / VLine
swift⟩ custom ⟩ view ⟩ HLine / VLine
/// ⭐️ horizontal line
struct HLine: View {
var color: Color = .red
var width: CGFloat = 1
var body: some View {
Rectangle().fill(color).frame(height: width)
}
}
/// ⭐️ vertical line
struct VLine: View {
var color: Color = .red
var width: CGFloat = 1
var body: some View {
Rectangle().fill(color).frame(width: width)
}
}
Last updated
Was this helpful?