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
-
The
UILabel
holds the key name string.Declaration
Swift
@IBOutlet public private(set) weak var keyLabel: UILabel!
-
The
UITextField
holds the value string.Declaration
Swift
@IBOutlet public private(set) weak var valueTextField: UITextField!
-
The value of the property.
Declaration
Swift
@IBInspectable public var value: String? { get set }
-
The key name of the cell.
Declaration
Swift
@IBInspectable public var keyName: String? { get set }