Skip to content

Simple Property Collection View Cell

FUISimplePropertyCollectionViewCell

open class FUISimplePropertyCollectionViewCell: NibDesignableFUIBaseCollectionViewCell

A variant of UICollectionViewCell which is very similar to SimplePropertyFormCell except that it's not editable.

  • keyName: The key of the cell.
  • value: The value of the cell.

Code Usage

Register FUISimplePropertyCollectionViewCell for a collection view object.

self.collectionView.register(FUISimplePropertyCollectionViewCell.self, forCellWithReuseIdentifier: FUISimplePropertyCollectionViewCell.reuseIdentifier)

Dequeue a FUISimplePropertyCollectionViewCell object from a collection view's dataSource method collectionView(_:cellForItemAt:)

public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
    let cell = self.collectionView.dequeueReusableCell(withReuseIdentifier: FUISimplePropertyCollectionViewCell.reuseIdentifier, for: indexPath) as! FUISimplePropertyCollectionViewCell

    switch indexPath.item {
        case 0:
        cell.keyName = "Name"
        cell.value = "Broken Plates on Pole"
        case 1:
        cell.keyName = "Sort No."
        cell.value = "0001"
        default:
        break
    }

    return cell
}

Theming

Supported style classes

fdlFUISimplePropertyCollectionViewCell
fdlFUISimplePropertyCollectionViewCell_keyLabel
fdlFUISimplePropertyCollectionViewCell_valueTextField

Last update: April 14, 2021