I have a similar problem. The original looks something like this:
#Preview {
struct AllCurrencyFormatInputPreview: View {
var body: some View {
VStack {
...
}
Text(...)
...
}
}
struct TopicsPreview: View {
var body: some View {
NavigationStack {
List {
NavigationLink("Currency",
destination: AllCurrencyFormatInputPreview().navigationTitle("Currency"))
}
}
}
}
return TopicsPreview()
}
The target view goes beyond the navigation bar. My work around is wrapping the content of AllCurrencyFormatInputPreview with a ScrollView. That solves my problem.
struct AllCurrencyFormatInputPreview: View {
var body: some View {
ScrollView {
VStack {
...
}
Text(...)
...
}
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: