UICollectionView like iOS Home Screen [closed]

纵然是瞬间 提交于 2019-12-03 04:36:10

问题


I wanna make an UICollectionView like iOS Home Screen. I found several (and good) samples like:

http://mobile.tutsplus.com/tutorials/iphone/uicollectionview-layouts/

http://www.cocoacontrols.com/platforms/ios/controls/sespringboard

http://www.cocoacontrols.com/platforms/ios/controls/aqgridview

http://www.cocoacontrols.com/platforms/ios/controls/namenu

http://www.cocoacontrols.com/platforms/ios/controls/mgbox2

iOS: Are there any open-source Launcher Views like the home screen?

All libraries above work well. Editing, removing and animating is not a problem. But combining two cells into a new group, well, none of the libraries was able to do it. I heavily searched and I didn't find anything. Does anybody know any libraries to combine two cells with drag and drop?!?! Or at least has some tips on how to make?!?


回答1:


You can use sections to group items and SupplementaryElements to decorate groups.

Or

You can also just create 2 kinds of different UICollectionViewCells: one normal cell + one group cell.

If your data source reflects grouping it should straight-forward to decide which one to return in collectionView:cellForItemAtIndexPath: .



来源:https://stackoverflow.com/questions/13519302/uicollectionview-like-ios-home-screen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!