JTAppleCalendar icon indicating copy to clipboard operation
JTAppleCalendar copied to clipboard

crash on layoutIfNeeded()

Open Shliferd opened this issue 5 years ago • 1 comments

(Required) Version Number: 7.1.8

It occurs for iOS <= 12.4

Description:

If the scrolling mode is set to .stopAtEachCalendarFrame and call layoutIfNeeded() in layoutSubviews() the method targetPointForItemAt(indexPath: sectionIndexPath) within JTAppleCalendarView class returns a CGPoint(x: NaN, y: 0) crashing the app. It should return 0 instead of NaN as for iOS 13.

Workaround:

Set the calendar initial scrolling mode to scrollAtEachSection and change the scrolling mode to stopAtEachCalendarFrame in layoutSubviews() after layoutIfNeeded().

Shliferd avatar Apr 30 '20 11:04 Shliferd

Hmm. So just to be clear, this does not happen in version 8?

patchthecode avatar Apr 30 '20 16:04 patchthecode

CLose due to no response.

patchthecode avatar Oct 02 '23 15:10 patchthecode