我正在尝试像这样制作用户界面:http://i.stack.imgur.com/aJcpr.png 我正在使用此代码:
override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
let start = (indexPath.row % 2 == 0) ? 2 : 1
let finish = (self.collectionView?.numberOfItemsInSection(indexPath.section))!
for i in start..<finish {
let path = NSIndexPath(forRow: indexPath.row + i, inSection: indexPath.section)
let cell = collectionView.cellForItemAtIndexPath(path)
cell?.center.y += 100
}
但我的身高UICollectionView
有问题(请参阅此处http://savepic.org/7780391.png)
如何增加此高度以使最后两行也向下移动?