Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get equal lines (spacing) in Calendar View #1335

Open
elliotcz97 opened this issue Jul 21, 2021 · 2 comments
Open

Get equal lines (spacing) in Calendar View #1335

elliotcz97 opened this issue Jul 21, 2021 · 2 comments

Comments

@elliotcz97
Copy link

elliotcz97 commented Jul 21, 2021

Version: 8.0.3

I'am using the calendar library since a good while and im loving it!

I recently tried my app on iPhone SE (2nd gen), and noticed a strange behaviour.

The separator lines ( the cell insets, which are getting set by using minimumLineSpacing and minimumInteritemSpacing )
are altering in size. ( sometimes its the right size sometimes its more)

I have set them both to 0.4. And this is what im talking about.

Bildschirmfoto 2021-07-21 um 16 53 40

The calendarView is pinned to trailing and leading, And has a fixed height of 290.

Bildschirmfoto 2021-07-21 um 16 54 08

This is the configuration code:
ConfigurationParameters(startDate: startDate, endDate: endDate, numberOfRows: 6, calendar: Calendar.current, generateInDates:InDateCellGeneration.forAllMonths , generateOutDates: OutDateCellGeneration.tillEndOfGrid, firstDayOfWeek: .monday, hasStrictBoundaries: true)

I know this has to do something with UICollectionView described in the issue #1147

My question is how could i solve this problem? Maybe a mathematic calculation for the line size, so that it gives an even number when calculating the cell size. Unfortunatelly i could not come up with a solution for this. I would appretiate some help.
Thank you in advance!

@elliotcz97
Copy link
Author

Any chance to get help with this?

@patchthecode
Copy link
Owner

Apologies for the late response.
2020-2023 has been some interesting years..
I'm assuming you have this resolved.

however, if not, the issue you linked to should have the answer.
What is the width of your calendar now? if you give me that number, i can tell you the answer.

or you can just find the nearest multiple of 7 or a number close to it then when divided by 7, doesnt have a re-occuring value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants