Hey, I would like to move the symbols and texts to the right side
That's the code:
NavigationView {
VStack {
List {
Label (
title: { Text("tv") }, icon: { Image(systemName: "tv") }
How do you do that? Thanks in advance for the answers!
- Set frame and alignment:
.frame(maxWidth: .infinity, alignment: .trailing)
- Within the List, "Group" your items, so that frame and alignment apply to them all:
NavigationView {
VStack {
List {
Group {
Label(title: { Text("tv") }, icon: { Image(systemName: "tv")})
Label(title: { Text("another tv") }, icon: { Image(systemName: "tv")})
}
.frame(maxWidth: .infinity, alignment: .trailing)
}
}
}