I want to recreate an user experience like in the settings app in tvOS. Therefore I have a HStack
with some content on the left side and a List
of NavigationLink
s on the right side.
However a focused link in the list gets clipped on the left side. I tried paddings and spacers and what not, but nothing helped. Is this is a bug or am I missing something?
Here is some example code to show the problem:
struct ContentView: View {
var body: some View {
NavigationStack {
HStack(spacing: 20) {
VStack(alignment: .center) {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
List {
ForEach(SomeViewEnum.allCases) { someView in
NavigationLink(someView.rawValue, value: someView)
}
}
.navigationDestination(for: SomeViewEnum.self) { someView in
Text(someView.rawValue)
}
}
}
}
}
And a screenshot to show the problem: