JXSegmentedView
JXSegmentedView copied to clipboard
ListContainerView 使用 ScrollView 时,点击 segment ,ListContainerView contentOffset 计算有问题
当JXSegmentedListContainerView
使用 ScrollView
时。
segment.isContentScrollViewClickTransitionAnimationEnabled=true
在segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int)
方法中,使用改变高度约束的方式 containerView
高度。
会出现containerView``contentOffset
计算出现问题,多增加一个childView
宽度。(滑动 ListContainer
不会出现此问题)
取消动画就会好。
这个大概是哪里出了问题?
而如果使用 CollectionView
会出现滑动后IndicatorLineView
位置不准的情况。
我也遇到了同样的问题: 在这个页面出现了修改Layout约束,导致了点击JXSegmentedView时,listContainer显示的页面不是自己期望的页面(但在listContainer左右滑动却没有这样的问题) 解决方案:让自己的layout代码,延时了500ms~~~~