Jtapplecalendar: White line within calendar

Created on 13 Dec 2016  ·  5Comments  ·  Source: patchthecode/JTAppleCalendar

First point - amazing project.

I am trying to remove a white line that is appearing within the calendar view. I have highlighted this by making each cell black as below:

screen shot 2016-12-13 at 09 35 48

I am doing the following to resize the cells:

        calendar.itemSize = 50
        calendar.cellInset = CGPoint(x:0, y:0)

Using autolayout then view is pinned to the side. How can I go about removing that white line. Is only an issue as I draw a line between selected view and that line appears!

The real life example

simulator screen shot 13 dec 2016 09 45 18

duplicate

All 5 comments

yes, this is the only bug i cant fix. It is an iOS issue with floating point numbers.
The work around is posted in the open issues here -> https://github.com/patchthecode/JTAppleCalendar/issues/26

simply set the inset to some small negative number.

calendar.cellInset = CGPoint(x:-0.2, y:-0.2)

or some smaller negative number. Just small enough to make the line disappear.

I also noticed that your selected view is not a perfect circle:
screen shot 2016-12-13 at 2 51 06 am

Please set the corner radius to be around 1/2 of the width of the UIView.

Also, if this project has been helpful to you, please consider giving a star rating and spread the word. Thanks :D

Much appreciated. Thanks and good spot!

Cool man and thanks for the support.
That calendar looks awesome by the way. Reminds me of one i saw on AirBnb. I was trying to replicate it for an example for people to follow. Cheers 🍻

Was this page helpful?
0 / 5 - 0 ratings