VACalendar
VACalendar copied to clipboard
When I present screen it's view not display proper
Please find below image for more information from below link. Image
Also, I am not able to load the calendar with my selected month and year. Can you please help me to find solutions? @Binusz, @spase84 , @Binusz , @Vodolazkyi
"Also, I am not able to load the calendar with my selected month and year. Can you please help me to find solutions?" - I have fixed adding below methods in the pod.
// IN VACalendarView.swift Class
// specify all properties before calling setup()
public func setup() {
delegate = self
calendar.delegate = self
directionSetup()
calculateContentSize()
setupMonths()
scrollToStartDate()
}
// ADD THESE LINES FOR SET CALENDAR MONTHS
public func setUpMonthData(date:Date){
self.scrollToDate(date: date)
}
func scrollToDate(date:Date) {
let startMonth = monthViews.first(where: { $0.month.dateInThisMonth(date) })
var offset: CGPoint = startMonth?.frame.origin ?? .zero
setContentOffset(offset, animated: false)
drawVisibleMonth(with: contentOffset)
if viewType == .week {
let weekOffset = startMonth?.week(with: startDate)?.frame.origin.x ?? 0
let inset = startMonth?.monthViewAppearanceDelegate?.leftInset?() ?? 0
offset.x += weekOffset - inset
setContentOffset(offset, animated: false)
}
}