JXSegmentedView icon indicating copy to clipboard operation
JXSegmentedView copied to clipboard

IOS15,点击tab切换界面会卡住

Open FukeYang opened this issue 4 years ago • 7 comments

FukeYang avatar Oct 09 '21 03:10 FukeYang

iphone12, iphone12pro会出现这个问题

FukeYang avatar Oct 09 '21 07:10 FukeYang

setContentOffset animated 为true时候卡顿 JXSegmentedView 574行修改如下 if contentScrollView != nil && (selectedType == .click || selectedType == .code) { // contentScrollView!.setContentOffset(CGPoint(x: contentScrollView!.bounds.size.widthCGFloat(index), y: 0), animated: isContentScrollViewClickTransitionAnimationEnabled) if isContentScrollViewClickTransitionAnimationEnabled { UIView.animate(withDuration: 0.25) { self.contentScrollView?.contentOffset = CGPoint(x: self.contentScrollView!.bounds.size.widthCGFloat(index), y: 0) } }else{ contentScrollView?.contentOffset = CGPoint(x: contentScrollView!.bounds.size.width*CGFloat(index), y: 0) } }

zhangyuge avatar Oct 23 '21 03:10 zhangyuge

+1

BeingCode avatar Nov 17 '21 01:11 BeingCode

如何复现呢?

pujiaxin33 avatar Nov 20 '21 12:11 pujiaxin33

在15.0.1 和 15.0.2 系统上频繁点击Segmentview就出现了

zjinhu avatar Nov 22 '21 02:11 zjinhu

hello @pujiaxin33 这个有预期什么时候修复嘛...

ruins-hacker avatar Dec 09 '21 11:12 ruins-hacker

w 574行修改如下 if contentScrollView != nil && (selectedType == .click || selectedType == .code) { // contentScrollView!.setContentOffset(CGPoint(x: contentScrollView!.bounds.size.width_CGFloat(index), y: 0), animated: isContentScrollViewClickTransitionAnimationEnabled) if isContentScrollViewClickTransitionAnimationEnabled { UIView.animate(withDuration: 0.25) { self.contentScrollView?.contentOffset = CGPoint(x: self.contentScrollView!.bounds.size.width_CGFloat(index), y: 0) } }else{ contentScrollView?.contentOffset = CGPoint(x: contentScrollView!.bounds.size.width*CGFloat(index), y: 0) } }

请问这个是什么原理呢

DNC-7 avatar Jun 16 '22 06:06 DNC-7