更新时间:2023-12-05 10:35:46
您是否尝试过将UICollectionViewFlowLayout的滚动方向设置为水平?
Have you tried setting the scroll direction of your UICollectionViewFlowLayout to horizontal?
[yourFlowLayout setScrollDirection:UICollectionViewScrollDirectionHorizontal];
您将需要在集合视图上启用分页,如下所示:
You'll need to enable paging on your collection view like so:
[yourCollectionView setPagingEnabled:YES];