FUISimplePropertyCollectionViewCell

public class FUISimplePropertyCollectionViewCell: NibDesignableCollectionViewCell

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. swift self.collectionView.register(FUISimplePropertyCollectionViewCell.self, forCellWithReuseIdentifier: FUISimplePropertyCollectionViewCell.reuseIdentifier)

Dequeue a FUISimplePropertyCollectionViewCell object from a collection view’s dataSource method collectionView(_:cellForItemAt:) “`swift 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

} ”`

  • The UILabel holds the key name string.

    Declaration

    Swift

    @IBOutlet public weak var keyLabel: UILabel!
  • The UITextField holds the value string.

    Declaration

    Swift

    @IBOutlet public weak var valueTextField: UITextField!
  • The default cell reuse identifier.

    Declaration

    Swift

    open static var reuseIdentifier: String
  • The value of the property.

    Declaration

    Swift

    public var value: String?
  • The key name of the cell.

    Declaration

    Swift

    public var keyName: String?