Jtapplecalendar: 8.0 layout issues. I saw this issue somewhere else, but can't for the life of me find it again.

Created on 5 Jun 2020  路  15Comments  路  Source: patchthecode/JTAppleCalendar

8.0.3

Since migration to 8.0 my calendar is not displaying properly. No code of mine has changed.

All days load, but they no longer respect the constraints. This is worse on iPhone but its easier to see what's wrong on iPad, pictured below.

This is how the view loads

Screen Shot 2020-06-05 at 12 15 26 PM

As you can see the grid is not displaying correctly. This exact code was working perfectly before 8.0 so I don't know what I'm missing.

The screenshot is of June, so the 1st should be a Monday, which is what is set in my configuration parameters

All 15 comments

As you can see the grid is not displaying correctly.

Do you have a sample app which replicates this issue?

I apologize, I'm new at this. How would I go about doing that?

create a sample project that has this error.
zip the file.
Then drag the zip file into the chat box.

Im working on making one. Sorry for delay

take your time. Haha. I am also tied up with other work.

In the meantime just as another clue hopefully, adding "calendarView.cellSize = calendarView.bounds.width / 7" fixes the width (but not height obviously) on iPhone, but the same code when run on iPad makes this happen.
Screen Shot 2020-06-11 at 12 42 18 PM

I have created a sample app that is basically that view copied over with the irrelevant code removed (segue's, core data, etc) and its working perfectly so I think I'm just going to have to find what I removed that's breaking things

Ok I've figured out that it has to do with how the tab bar is resizing the view. The sample app breaks as soon as I embedded the view in a tab bar. If I can't figure it out by the end of the day I'll throw it up on here.

Fixed it. I needed to change the Layout option on my calendar view in the storyboard from "Automatic" to "Translate Mask Into Constraints". A couple small tweaks to other constraints and it's all back to the way it was.

Awesome. Glad it was resolved.

Translate Mask Into Constraints

Can you put a screenshot here of where that option is located?

Screen Shot 2020-06-18 at 11 16 26 AM

oh. wow.
haha, now it all makes sense.
Your project should be using constraints.
This is how this library works.
Usually i do not see that screen shot because I use storyboard. I should have known.
Thanks for the information.

Yeah it was a real facepalm moment for me haha. Thanks for your work on the project in general, it's been awesome for me

awesome and thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VladFrolov picture VladFrolov  路  4Comments

programus picture programus  路  3Comments

Kevinw14 picture Kevinw14  路  3Comments

arn00s picture arn00s  路  3Comments

zhanswift picture zhanswift  路  5Comments