0

我試圖做的是隻有在UICollectionView細胞的一行的應用程序,不過我使用的的FlowLayout和下面看到棧細胞。UICollectionView自定義佈局與單個小區在景觀

enter image description here

我想讓它這樣的事情。用戶可以向左或向右滑動以到達下一個單元格。這可能嗎?

enter image description here

+0

看看這個教程:用集合視圖分頁](http://mobileappdev.learningtree.com/2012/12/13/paging-with-collection-意見部分-1 /) –

回答

0

你必須做3兩件事: 設置的FlowLayout水平滾動,啓用分頁,並設置單元格的大小,採取了整個空間。 ( - ScrollDirection,滾動型 - 啓用分頁和CollectionViewSize - 單元格大小/高度的CollectionView): 這一切都可以在筆尖文件中的CollectionView的設置來完成。


enter image description here

enter image description here

+0

如果我想讓它爲iPhone我假設它必須是320寬的單元尺寸? –

+0

320x460是的,基本上你的屏幕的整體尺寸(減去狀態欄或降低它的任何其他視圖) – Nerkatel