Closed akabab closed 8 years ago
Else, is there any way to fix the itemSize beeing Zero at that point ?
looking into it.
Ok.
4.0.0 -> 4.0.2
I patched 4.0.0 and fixed with guard itemSize.width != 0 else { return nil }
because layoutAttributesForElementsInRect
is called before updateLayoutItemSize
so itemSize is not yet set on first call so let requestedColumns = Int(ceil(rect.width / itemSize.width))
divided by zero makes the crash
But 4.0.2 looks very unstable, uncleaned, with many unused code. Btw, thanks for your reactivity.
ok you patched 4.0.0 ? or 4.0.2?
4.0.0
hmm. Ok. Aright.
But I thought i went through 4.0.2 code with a fine tooth comb. There are no issues from my end. Which code is unused? ...ugh i need details. I dont know where or what problems you are seeing
actually it is not even fixing it, sometimes the cells are not drawn.. anyway I might take a deeper look in 4.0.2
I know youre busy with your project. But any help i can get with this project will be awesome. Since im the sole coder >_<
Yeah I was about to propose, will be able to help in a couple of week when I'm back from holiday. I'm leaving tomorrow, and I don't get why this issue popped up from nowhere without updating the lib, it now crash instantly on loading the view..
OK. Before you go.
you mentioned that cells are not being Drawn.
Are you registering cells with a Xib file ->
calendarView.registerCellViewXib(fileName: "CellView")
?
or
Are you registering cells with class ->
calendarView.registerCellViewClass(fileName: "JTAppleCalendar_Example.CodeCellView")
Request sent
Ok. Bug was due to iOS simulator in an inconsistent state. Closing this issue.
If, you're back. Do an update to 4.1.0 I found the issue that was causing this issue.
Had a crash on JTAppleCalendarHorizontalFlowLayout.swift: line 131
let requestedColumns = Int(ceil(rect.width / itemSize.width))
because itemSize = (0, 0)so I updated to 4.0.2, but my view layout is now totally broken, is there something more you added to configure now ? I see you changed a lot of stuff on FlowLayout, it is not stable at all.