I use this code to show ReaderView:
var body: some View {
NavigationStack {
VStack {
ReaderView(controller: viewModel.readerController)
.ignoresSafeArea()
}
.onAppear {
viewModel.loadBook()
}
}
}
I have a button to change theme.
class ContentViewModel {
...
func setTheme(_ theme: Theme) {
Task {
try? await readerController.change(theme: theme)
}
}
}
When I change theme, it changed, but I have a problem with Navigation Bar:
Start theme:

Set dark theme (Book scroll is on top, Navigation Bar is white):

Scroll book a little bit down:

How to fix the issue with Navigation Bar theme when Book scroll is on top?
I use this code to show ReaderView:
I have a button to change theme.
When I change theme, it changed, but I have a problem with Navigation Bar:

Start theme:
Set dark theme (Book scroll is on top, Navigation Bar is white):

Scroll book a little bit down:

How to fix the issue with Navigation Bar theme when Book scroll is on top?