I'm trying to create a custom control similar to a DisclosureGroup.
I would like to align the leading edges of "11" and "First". There is a Button preceding "First", but none preceding "11".
Bonus question. I'm using SF Symbols for the arrows, but I would like to use the > and V used in DisclosureGroup. Are those symbols available?
Thanks, Mark
var body: some View {
List(items, selection: $selection) { master in
HStack {
if master.master {
Button {
if master.master {
expanded.formSymmetricDifference([master.id])
}
} label: {
Image(systemName: expanded.contains(master.id) ? "arrowtriangle.down" : "arrowtriangle.forward")
}
.buttonStyle(BorderlessButtonStyle())
}
Text(master.name)
}
}
.frame(width: 200)
}