You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that in some cases the TimelineContainer cannot correctly calculate the distance to the nearest EventView. I was able to reproduce this error today. The project demonstrating the bug is located here. Just switch to segment 3 and you will see this:
I did a little digging in the code and noticed that this happens due to the fact that in the TimelineContainer#setTimelineOffset(offset:animated:) method changing the bottomOfScrollView to a negative value. This, in turn, is due to the fact that the contentSize.height at the time of calculation is 0. I suspect this is due to the fact that the calculation takes place before the subviews were layout.
Code I'm using with CalendarKit
In short, I have a controller for SegmentedControll that will switch tabs inside contentView. The tab bar is hidden, so it looks like the SegmentedControll screens just like the TabBarController does. I highly recommend looking at the entire bug demostrate project to better understand how everything works.
Hi, thanks for the report. Looking at your description, it seems like it's a lifecycle issue. Could you please try to analyze the root cause and try to narrow down the prbolem?
New Issue Checklist
Issue Description
I noticed that in some cases the
TimelineContainer
cannot correctly calculate the distance to the nearestEventView
. I was able to reproduce this error today. The project demonstrating the bug is located here. Just switch to segment 3 and you will see this:I did a little digging in the code and noticed that this happens due to the fact that in the
TimelineContainer#setTimelineOffset(offset:animated:)
method changing thebottomOfScrollView
to a negative value. This, in turn, is due to the fact that thecontentSize.height
at the time of calculation is 0. I suspect this is due to the fact that the calculation takes place before the subviews were layout.Code I'm using with CalendarKit
In short, I have a controller for
SegmentedControll
that will switch tabs insidecontentView
. The tab bar is hidden, so it looks like theSegmentedControll
screens just like theTabBarController
does. I highly recommend looking at the entire bug demostrate project to better understand how everything works.SegmentedHostViewController.swift
MyDayviewController.swift
The text was updated successfully, but these errors were encountered: