TableCell

public class TableCell
extension TableCell: Equatable
extension TableCell: Hashable

Undocumented

  • Undocumented

    Declaration

    Swift

    public typealias EditorInitializer = () -> EditorView
  • Undocumented

    Declaration

    Swift

    public var onEditorInitialized: ((TableCell, EditorView) -> Void)?
  • Additional attributes that can be stored on Cell to identify various aspects like Header, Numbered etc.

    Declaration

    Swift

    public var additionalAttributes: [String : Any]
  • Undocumented

    Declaration

    Swift

    public var attributedText: NSAttributedString?
  • Row indexes spanned by the cell. In case of a merged cell, this will contain all the rows= indexes which are merged.

    Declaration

    Swift

    public internal(set) var rowSpan: [Int] { get }
  • Column indexes spanned by the cell. In case of a merged cell, this will contain all the column indexes which are merged.

    Declaration

    Swift

    public internal(set) var columnSpan: [Int] { get }
  • Frame of the cell within GridView

    Declaration

    Swift

    public internal(set) var frame: CGRect { get set }
  • Undocumented

    Declaration

    Swift

    public var backgroundColor: UIColor? { get set }
  • Controls if the cell can be selected or not.

    Declaration

    Swift

    public var isSelectable: Bool { get set }
  • Undocumented

    Declaration

    Swift

    public var isSelected: Bool { get set }
  • Denotes if the cell can be split i.e. is a merged cell.

    Declaration

    Swift

    public var isSplittable: Bool { get }
  • Content size of the cell

    Declaration

    Swift

    public var contentSize: CGSize { get }
  • Content view for the cell

    Declaration

    Swift

    public private(set) var contentView: TableCellContentView? { get set }
  • Undocumented

    Declaration

    Swift

    public var editor: EditorView? { get }
  • Undocumented

    Declaration

    Swift

    public let gridStyle: GridStyle
  • Undocumented

    Declaration

    Swift

    public var style: GridCellStyle
  • Initializes the cell

    Important

    Creating a GridView with 100s of cells can result in slow performance when creating an attributed string containing the GridView attachment. Using the closure defers the creation until the view is ready to be rendered in the UI. It is recommended to setup all the parts of editor in closure where possible, or wait until after the GridView is rendered. In case, editor must be initialized before the rendering is complete and it is not possible to configure an aspect within the closure itself, setupEditor() may be invoked. Use of setupEditor() is discouraged.

    Declaration

    Swift

    required public init(rowSpan: [Int],
                columnSpan: [Int],
                initialHeight: CGFloat = 40,
                style: GridCellStyle = .init(),
                gridStyle: GridStyle = .default,
                editorInitializer: EditorInitializer? = nil)

    Parameters

    rowSpan

    Array of row indexes the cells spans. For e.g. a cell with first two rows as merged, will have a value of [0, 1] denoting 0th and 1st index.

    columnSpan

    Array of column indexes the cells spans. For e.g. a cell with first two columns as merged, will have a value of [0, 1] denoting 0th and 1st index.

    initialHeight

    Initial height of the cell. This will be updated based on size of editor content on load,

    style

    Visual style of the cell

    gridStyle

    Visual style for grid containing cell border color and width

    ignoresOptimizedInit

    Ignores optimization to initialize editor within the cell. With optimization, the editor is not initialized until the cell is ready to be rendered on the UI thereby not incurring any overheads when creating attributedText containing a GridView in an attachment. Defaults to false.

    editorInitializer

    Closure for setting up the EditorView within the cell.

  • Sets the focus in the Editor within the cell.

    Declaration

    Swift

    public func setFocus()
  • Removes the focus from the Editor within the cell.

    Declaration

    Swift

    public func removeFocus()
  • Declaration

    Swift

    public static func == (lhs: TableCell, rhs: TableCell) -> Bool
  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)