Created
April 18, 2017 23:54
-
-
Save tsraveling/ea1fd7624421bd4c8f4356ac1a6598d6 to your computer and use it in GitHub Desktop.
UICollectionView delegate and datasource
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // MARK: - UICollectionView Datasource and Delegate - | |
| func numberOfSections(in collectionView: UICollectionView) -> Int { | |
| return 1 | |
| } | |
| func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | |
| // TODO: Implement count. | |
| return 1 | |
| } | |
| func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | |
| let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) | |
| return cell | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment