-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KDCalendar not compatible with SwiftUI #108
Comments
I have not built it for SwiftUI, that is true. If however you would like to add this support and do a Pull Request I would be forever grateful ;-) |
@shahedhossain It works with SwiftUI. The common problem is having keyboard on screen, when presenting UIViewRepresented view (or any other actually). |
Hello @suvov. Good day! |
Hello @shahedhossain ! What I do is resign first responders (if any) before presenting the calendar. // Resign first responder, using UIKit ( // Present view with calendar Might look like this in context: Button(action: {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
self.isCalendarPresented = true
}, label: {
Image(systemName: "calendar")
}).sheet(isPresented: $isCalendarPresented, content: {
self.calendarView()
}) Hope this helps, have a good day! |
MyCalendar
structure for getting support inSwiftUI
as following:It's shows only the week name and other parts of this calendar omitted from view and following errors occurred:
[Assert] negative or zero item sizes are not supported in the flow layout
Please find the details in StackOverflow
The text was updated successfully, but these errors were encountered: