I am using the following function to try and print out a Month for each header as you scroll through the calendar. There must be a problem with how I'm doing my for loop as the only month Im getting out is December. Any ideas? Thanks
With the print("(names)"), i am getting all of the months printed out on the console. However, I can't get them printed out correctly visually.
func calendar(_ calendar: JTAppleCalendarView, willDisplaySectionHeader header: JTAppleHeaderView, range: (start: Date, end: Date), identifier: String) {
//let months: [String] = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
let months = Calendar.current.monthSymbols
let headerCell = (header as? MonthsHeader)
for names in months {
print("\(names)")
headerCell?.monthsHeader.text = names
}
}