JXSegmentedView icon indicating copy to clipboard operation
JXSegmentedView copied to clipboard

selectItemAt(index: Int) 该方法能否增加参数支持动画选项:selectItemAt(index: Int, animated: Bool = true)

Open bosong opened this issue 4 years ago • 5 comments

bosong avatar Aug 05 '20 08:08 bosong

有时候 viewDidAppear 进入页面需要选中一个index不是0 的item,目前调用方法selectItemAt 默认有滚动动画,能否增加参数支持动画选项?方法类似 这样写 func selectItemAt(index: Int, animated: Bool = true),是否需要选中动画由用户使用场景决定。

bosong avatar Aug 05 '20 08:08 bosong

可以设置defatulSelectedIndex

pujiaxin33 avatar Aug 05 '20 08:08 pujiaxin33

@pujiaxin33 , defatulSelectedIndex 应该只能在初始化的过程中使用吧?例如当前controller A有一个JXSegmentedView,之后push一个controller B,回到controller A的时候需要把JXSegmentedView 选中第三个item,且不需要动画,这种情况用defatulSelectedIndex 是实现不了的。

bosong avatar Aug 05 '20 08:08 bosong

同求,页数太多的时候,不要动画

qingweiSun avatar Aug 25 '21 08:08 qingweiSun

设置下面属性可以控制不滚动

segmentedView.isContentScrollViewClickTransitionAnimationEnabled = false

nieyu avatar Feb 07 '22 02:02 nieyu