JTAppleCalendar: Calendar Grid is not fully 0,0 when set to 0,0 Cell inset. It is off by one pixel when orientation changes. This seems to be an iOS issue. Workaround for now is to set the inset to some negative fractional value if you are experiencing the issue.
I have a three month calendar (June - Aug, 2016). I’ve attached three images.
First is how the calendar initially appears, second is when I scroll from June to July and third is when I scroll back to June.
Here’s the additional code in my controller:
calendarView.dataSource = self
calendarView.delegate = self
calendarView.registerCellViewXib(fileName: "ScheduleCellView")
calendarView.backgroundColor = UIColor.whiteColor()
calendarView.cellInset = CGPoint(x: 2, y: 2)
let currentDate = calendarView.currentCalendarDateSegment()
setupViewsOfCalendar(currentDate.startDate, endDate: currentDate.endDate)
setupViewsOfCalendar is from the tutorial.



About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 33 (19 by maintainers)
Commits related to this issue
- Fixed bug Issue #26 https://github.com/patchthecode/JTAppleCalendar/issues/26 Cell inset 0,0 was not aligning properly — committed to patchthecode/JTAppleCalendar by patchthecode 8 years ago
- Fixed. Added Workaround - 1. // to handle https://github.com/patchthecode/JTAppleCalendar/issues/26 if cellInset.x == 0 { cellInset.x = -0.1 } if cellInset.y == 0 { cellInset.y = -0.1 } 2. Fixed is... — committed to patchthecode/JTAppleCalendar by patchthecode 8 years ago
- Fixed. Added Workaround - 1. // to handle https://github.com/patchthecode/JTAppleCalendar/issues/26 if cellInset.x == 0 { cellInset.x = -0.1 } if cellInset.y == 0 { cellInset.y = -0.1 } 2. Fixed is... — committed to patchthecode/JTAppleCalendar by patchthecode 8 years ago
Understood. Hmm. Alright then i’ll have to debug this on my end. In the mean time, try setting the inset to (-0.5, -0.5) or (-1, -1) as a work around (you can choose what ever number you like). Will get back to you.