var today1 = Date()
var tomorrowComponents = DateComponents()
tomorrowComponents.day = 1
let tomorrow = self.calendarView.calendar.date(byAdding: tomorrowComponents, to: today1)!
self.calendarView.selectDate(tomorrow)
#if KDCALENDAR_EVENT_MANAGER_ENABLED
self.calendarView.loadEvents() { error in
if error != nil {
let message = "The karmadust calender could not load system events. It is possibly a problem with permissions"
let alert = UIAlertController(title: "Events Loading Error", message: message, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: nil))
self.present(alert, animated: true, completion: nil)
}
}
#endif
self.calendarView.setDisplayDate(today1)`
App crash on this line of code
let tomorrow = self.calendarView.calendar.date(byAdding: tomorrowComponents, to: today1)!
xcode - 11.3.1
iOS - 12, 13 +
Please let me know how to fix this issue
`
xcode - 11.3.1 iOS - 12, 13 + Please let me know how to fix this issue