官术网_书友最值得收藏!

Working with UICollectionView

UICollectionView is a very handy and awesome view when it comes to dealing with grid layout. Collection view helps you create a grid layout (2D cells) easily without hassle. Collection view is just a scrollable view that lays out multiple cells in a grid layout. So, to create a collection view, you have to specify a data source and delegate exactly like UITableView. Besides that, you need to specify how the layout of your cells will appear. iOS provides you with an abstract class-UICollectionViewLayout-which should be subclassed to customize how the content will be managed. You can create your own custom layouts and describe how you want to lay out your cells. However, thanks to Apple, it provides us with a premade layout called UICollectionViewFlowLayout, which flow the layout by placing the cells one after the other based on their sizes and the spacing between them.

主站蜘蛛池模板: 商南县| 云阳县| 那曲县| 丁青县| 平山县| 长乐市| 五指山市| 西宁市| 广西| 乌兰察布市| 驻马店市| 武乡县| 汉阴县| 巴南区| 九江县| 莱阳市| 锡林浩特市| 威宁| 蓬安县| 封丘县| 徐汇区| 夹江县| 姜堰市| 扬州市| 拉萨市| 会同县| 盖州市| 崇文区| 平果县| 普兰店市| 云安县| 龙井市| 砚山县| 巴林左旗| 博爱县| 开平市| 济南市| 苏尼特左旗| 栾川县| 凤庆县| 永和县|