I am currently using UICollectionView
for the user interface grid, and it works fine. However, I'd like to be enable horizontal scrolling. The grid supports 8 items per page and when the total number of items are, say 4, this is how the items should be arranged with horizontal scroll direction enabled:
0 0 x x
0 0 x x
Run Code Online (Sandbox Code Playgroud)
Here 0 -> Collection Item and x -> Empty Cells
有没有办法使它们居中对齐,如:
x 0 0 x
x 0 0 x
Run Code Online (Sandbox Code Playgroud)
这样内容看起来更干净? …
我想实现UICollectionView
水平和无限滚动?
uiscrollview uiscrollviewdelegate ios uicollectionview swift