Open dorianpavetic opened 1 year ago
This is really weird - did you ever find a workaround? I'll play around with this later today to see what's up.
Can confirm the same behavior. Not even forcing navigationBarHidden false fixes it. As soon as we add any providers to the CalendarViewRepresentable, the nav bar goes away for good. Couldn't find a workaround.
small update, tried on iOS15 and it seems to work there, so something changed in iOS16 that breaks this.
Small update, my app is a tabbed app, I've noticed that when I switch to another tab and back to the calendar tab, the nav bar appears. So looks like a timing issue, a hacky workaround is to force a tab change at app start...however, when scrolling to another month (horizontal layout), the nav bar dissappears again for that month. Switching tabs fixes it for that month for good so it looks like the issue appears when first displaying a month.
Any updates on This? Seems like it's still happening in iOS 16
any updates on this? Seems like it pretty much blocks HorizonCalendar from being used in a SwiftUI context
@bryankeller, any updates for this? Using the providers makes the navigation title hidden, which is just like the OP said.
I'm assuming the issue is related to the CalendarViewRepresentable
being a ScrollView which messes with the large navigation title or something..? Whatever it is a simple workaround is to remove it from navigation stack hirachy. Simple way of doing that is overlaying it on top of a placeholder view:
var body: some View {
NavigationStack {
VStack {
Color.clear.overlay {
CalendarViewRepresentable(calendar: .current, [...])
}
}
}
}
I face the exact same problem. When using the days or months providers, the navigation bar disappears. Have you found any solutions?
Same issue here, and it's a real pain. We use the calendar in only 2 views and we have the same issue in both. Are there any updated on the issue?
Probably not the best solution, but I've fixed this in my apps by wrapping each Calendar in an extra NavigationView
Probably not the best solution, but I've fixed this in my apps by wrapping each Calendar in an extra NavigationView
I tried to do that but it did not work. Could you show me the code snippet of your project?
I have tried creating a calendar with exact as from your PR with example.
Works great, but I have noticed that when put inside a NavigationStack, title and toolbar disappears. I have tried some alternatives and figured out that toolbar and title appears when I remove both
monthHeaderItemProvider
anddayItemProvider
.WITH month and day providers
WITHOUT month and day providers
Am I doing something wrong? Is there some kind of a workaround or fix for this?