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.

screenshot 2016-05-24 10 39 52 screenshot 2016-05-24 10 40 04 screenshot 2016-05-24 10 40 20

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 33 (19 by maintainers)

Commits related to this issue

Most upvoted comments

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.