Last active
June 19, 2019 02:05
-
-
Save LeoAOliveira/adb59d8a4aed865d17a95f40eebd3628 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
// MARK: - Table View | |
// Provém um objeto de célula para cada linha. | |
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
// Parte 1: Buscar uma célula do tipo apropriado. | |
let cell = tableView.dequeueReusableCell(withIdentifier: "tableCell", for: indexPath) as! TableViewCell | |
// Parte 2: Configurar o conteúdo da célula. | |
cell.titleLabel!.text = "Título" | |
cell.layer.backgroundColor = UIColor.white as! CGColor | |
cell.collectionView.delegate = self | |
cell.collectionView.dataSource = self | |
return cell | |
} | |
// MARK: - Collection View | |
// Retorna o número de itens para a collection. | |
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | |
// code | |
} | |
// Provém um objeto de célula para cada item. | |
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | |
// code | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment