ios9 - iOS客户端 淘宝 的个人主页布局
大家讲道理
大家讲道理 2017-04-18 09:31:15
0
1
322

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
PHPzhong

Are you asking about the layout?

The layout of UICollectionView is simple
You use the Command key to open the DataSource of UICollectionView
There are various methods to set various parameters.
A few are listed below. The first two public methods are required and optional are optional

public protocol UICollectionViewDataSource : NSObjectProtocol {


@available(iOS 6.0, *) //一个Section中有多少个单元格
public func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int

@available(iOS 6.0, *) //返回 单元格,你可以给单元格里放个image
public func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell

@available(iOS 6.0, *) //有几个 Section (可选,没有此方法,默认是1个)
optional public func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int
/*
dequeueReusableSupplementaryViewOfKind:withReuseIdentifier:forIndexPath:
*/

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template