FUIKeyValueFormCell

open class FUIKeyValueFormCell : FUINoteFormCell, FUIPropertyFormCell

A customized UITableViewCell, which contains a UILabel and a UITextView. It takes text as input.

FUIKeyValueFormCell

This is a new implementation to replace the previous implementation of 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: FUIKeyValueFormCell.reuseIdentifier) as! FUIKeyValueFormCell
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:

fdlFUIKeyValueFormCell_title {}
fdlFUIKeyValueFormCell_valueText {}
fdlFUIKeyValueFormCell_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 }