Skip to content

Conversation

@houhui315
Copy link

如上描述,在ipx上你会看的播放错乱的情况,宽度为整数的时候正常播放

Copy link

@ptlCoder ptlCoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

方向是UICollectionViewScrollDirectionVertical 的时候,改变的是高度不是宽度,
if (_flowLayout.scrollDirection == UICollectionViewScrollDirectionHorizontal) {
[_mainView setContentOffset:CGPointMake(index*_flowLayout.itemSize.width, 0) animated:animated];
}else{
[_mainView setContentOffset:CGPointMake(0, index*_flowLayout.itemSize.height) animated:animated];
}

@chinaiOSSwift
Copy link

chinaiOSSwift commented Apr 29, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants