Last active
June 19, 2019 01:50
-
-
Save LeoAOliveira/9d995655580e2e54159694e6391f8bb8 to your computer and use it in GitHub Desktop.
This file contains 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
// Retorna o número de itens para a collection. | |
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | |
return 3 | |
} | |
// Provém um objeto de célula para cada item. | |
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | |
// Parte 1: Buscar uma célula do tipo apropriado. | |
let cellCollection = collectionView.dequeueReusableCell(withReuseIdentifier: "collectionCell", for: indexPath) as! CollectionViewCell | |
// Parte 2: Configurar o conteúdo da célula. | |
cellCollection.collectionViewTextLabel!.text = "Texto" | |
return cellCollection | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment