Klimi's new dotfiles with stow.
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

37 righe
1.2 KiB

# -*- mode: snippet -*-
# name: uicollectionViewDataSource
# key: uicollectionViewDataSource
# --
// MARK: UICollectionViewDataSource
func numberOfSections(in collectionView: UICollectionView) -> Int {
return $1
}
func collectionView(_ collectionView: UICollectionView,
numberOfItemsInSection section: Int) -> Int {
// TODO:- Required Method
return $2
}
func collectionView(_ collectionView: UICollectionView,
cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell =
collectionView.dequeueReusableCell(withReuseIdentifier: $3, for: indexPath)
configureCell(cell: cell, forItemAt: indexPath)
// TODO:- Required Method
return cell
}
func configureCell(cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
}
func collectionView(_ collectionView: UICollectionView,
viewForSupplementaryElementOfKind kind: String,
at indexPath: IndexPath) -> UICollectionReusableView {
let view = collectionView.dequeueReusableSupplementaryView(
ofKind: UICollectionElementKindSectionHeader,
withReuseIdentifier: $3, for: indexPath) as UIView
return view
}