FUIKeyValueTableViewCell

@MainActor
open class FUIKeyValueTableViewCell : FUIInlineValidationDrawingTableViewCell<FUIKeyValueContentView>
extension FUIKeyValueTableViewCell: UITextViewDelegate

A UITableViewCell subclass for showing key-value text in a vertical stack.

Usage

override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    guard let cell = tableView.dequeueReusableCell(withIdentifier: FUIKeyValueTableViewCell.reuseIdentifier, for: indexPath) as? FUIKeyValueTableViewCell else {
        return UITableViewCell()
    }

    cell.title.text = "Short title text"
    cell.value = "Short value text"
    cell.accessoryType = .detailButton

    return cell
}

Behavior

  • Tapping the cell (outside the value text view or when ‘dataDetectorTypes’ is not set) triggers table view navigation via tableView(_:didSelectRowAt:).
  • Tapping detected links in the value text view (when dataDetectorTypes is set) performs system actions (e.g., opening URL or dialing phone number).

Theming

Supported TEXT class paths:

fdlFUIKeyValueTableViewCell_title {}
fdlFUIKeyValueTableViewCell_valueText {}

Supported TEXT properties:

font-color (Color)
font-name (FontName)
font-style (UIFontTextStyle)
font-size (Number)
text-align (TextAlign)
text-line-clamp (Integer)
  • The text view for showing the value text.

    Declaration

    Swift

    @MainActor
    public var valueTextView: UITextView { get }
  • The data detector types to enable for the value text view (e.g., .link, .phoneNumber).

    Declaration

    Swift

    @MainActor
    public var dataDetectorTypes: UIDataDetectorTypes { get set }
  • Undocumented

    Declaration

    Swift

    @MainActor
    open override func didMoveToSuperview()
  • Declaration

    Swift

    @MainActor
    override open func prepareForReuse()
  • Undocumented

    Declaration

    Swift

    @MainActor
    public func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool
  • Undocumented

    Declaration

    Swift

    @MainActor
    public func textViewDidChangeSelection(_ textView: UITextView)
  • Undocumented

    Declaration

    Swift

    @MainActor
    public override func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool