Skip to content

Instantly share code, notes, and snippets.

@MickaelCruzDB
Created February 25, 2020 09:55
Show Gist options
  • Save MickaelCruzDB/22d11e657e7b24546759c874236f8127 to your computer and use it in GitHub Desktop.
Save MickaelCruzDB/22d11e657e7b24546759c874236f8127 to your computer and use it in GitHub Desktop.
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
// Working with functions categories collection view
if collectionView == self.functionsCategoriesCollectionView {
let cellFunctionsCategories = collectionView.dequeueReusableCell(withReuseIdentifier: "cellCat", for: indexPath) as! DevicePageFunctionsCategoriesCVCell
cellFunctionsCategories.cellTitleContent.text = ICDatabase.objects(FunctionCategory.self)[indexPath.row].name.uppercased()
cellFunctionsCategories.setGradientBorder(width: 10, colors: [UIColor(red: 127.0/255.0, green: 127.0/255.0, blue: 127.0/255.0, alpha: 1.0), UIColor(red: 47.0/255.0, green: 47.0/255.0, blue: 47.0/255.0, alpha: 1.0)])
return cellFunctionsCategories
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment