FUIDrawingNoteFormCell

This is the new implementation to replace the FUINoteFormCell, to allow user enter notes. 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: FUIDrawingNoteFormCell.reuseIdentifier) as! FUIDrawingNoteFormCell
 cell.onChangeHandler = { [unowned self] newValue in
     self.noteText = newValue
 }
 cell.placeholder.text = "Enter Description"
 cell.value = noteText
 cell.isTrackingLiveChanges = true

## Theming

Supported TEXT class paths:

    fdlFUIDrawingNoteFormCell_valueText {}
    fdlFUIDrawingNoteFormCell_placeholder {}

Supported TEXT properties:

    font-color: Color;
    font-style: UIFontTextStyle;
  • Indicates if the note text could be modified or not. The default is true.

    Declaration

    Swift

    public var isEditable: Bool { get set }
  • If isTrackingLiveChanges is true, then onChangeHandler will be invoked for every letter entered.

    Otherwise, onChangeHandler will be invoked only after user taps Done key, or the field resigns first responder.

    Defaults to false.

    Declaration

    Swift

    public var isTrackingLiveChanges: Bool { get set }
  • The minimum number of lines in this FUIDrawingNoteFormCell.

    The cell height will be set to display the text with this number of lines. The default value is 1. Setting this value to less or equal to zero is ignored. This property is ignored when the height of the cell is fixed.

    Declaration

    Swift

    public var minNumberOfLines: Int { get set }
  • The maximum number of lines in this FUIDrawingNoteFormCell.

    The cell height could grow to display the text with this number of lines. This property is ignored when the height of the cell is fixed. The view will be scrollable when the text entered needs more lines to be displayed. The default is 0, which means no limit.

    Note that more text may be displayed in the view due to extra top and buttom margins of the text view in the cell.

    Declaration

    Swift

    public var maxNumberOfLines: Int { get set }
  • The UI component holds the note text.

    Declaration

    Swift

    public var valueTextView: FUITextView { get }