FUIDrawingKeyValueFormCell

open class FUIDrawingKeyValueFormCell : FUIDrawingNoteFormCell, FUIPropertyFormCell

This is the new implementation to replace the FUIKeyValueFormCell. It has a keyName field and an editable value text field to let user entered the value for this property. This cell height is automatically adjusted to allow the whole content to be displayed. However, the cell height is also limited to the height of the screen above the soft keyboard height.

Developer could use to UITableViewDelegate‘s func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat to set a fixed height for the cell.

Usage

let cell = tableView.dequeueReusableCell(withIdentifier: FUIDrawingKeyValueFormCell.reuseIdentifier) as! FUIDrawingKeyValueFormCell
cell.onChangeHandler = { [unowned self] newValue in
    print("value: \(newValue)")
    self.value = newValue
}
cell.keyName = "Project Title"
cell.placeholder.text = "Please enter a title"
cell.value = value
cell.isTrackingLiveChanges = true
return cell

Theming

Supported TEXT class paths:

fdlFUIDrawingKeyValueFormCell_title {}
fdlFUIDrawingKeyValueFormCell_valueText {}
fdlFUIDrawingKeyValueFormCell_placeholder {}

Supported TEXT properties:

font-color: Color;
font-style: UIFontTextStyle;
  • The key name of the cell.

    Declaration

    Swift

    open var keyName: String? { get set }
  • The FUIText which holds the text of the keyName.

    Declaration

    Swift

    public var keyText: FUIText { get }