forked from burczyk/XcodeSwiftSnippets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUICollectionViewDataSource.swift
24 lines (18 loc) · 1.14 KB
/
UICollectionViewDataSource.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//MARK: UICollectionViewDataSource
func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int {
return <#numberOfSections#>
}
func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return <#numberOfItems#>
}
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(<#identifier#>, forIndexPath: indexPath) as! UICollectionViewCell
configureCell(cell, forItemAtIndexPath: indexPath)
return cell
}
func configureCell(cell: UICollectionViewCell, forItemAtIndexPath: NSIndexPath) {
}
func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView {
let view = collectionView.dequeueReusableSupplementaryViewOfKind(UICollectionElementKindSectionHeader, withReuseIdentifier: <#identifier#>, forIndexPath: indexPath) as! UIView
return view
}