-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
I am using FSCalendar in SwiftUI and I am updating CalenderView on change of reloadData ehere reloadData is @State variable.
Here FSCalendar.reoadData() is not refreshing view or triggering willDisplay methods.
Here is updateUIView snippet.
func updateUIView(_ uiView: FSCalendar, context: Context) {
if uiView.scope != calendarScope {
if calendarScope == .week {
UIView.animate(withDuration: 0.3) {
DispatchQueue.main.async {
uiView.setScope(self.calendarScope, animated: true)
}
}
} else {
UIView.animate(withDuration: 0.3) {
DispatchQueue.main.async {
uiView.scope = .month
}
}
}
}
if reloadData {
DispatchQueue.main.async {
uiView.reloadData()
}
}
}
Metadata
Metadata
Assignees
Labels
No labels