UITableView

  • Mechanica

    Registers a nib object containing an UITableViewCell subclass conforming to Reusable & NibIdentifiable.

    Seealso

    register(_:forCellReuseIdentifier:)

    Declaration

    Swift

    public final func register<T: UITableViewCell>(cellType: T.Type) where T: NibReusable

    Parameters

    cellType

    The UITableViewCell subclass to register,

  • Mechanica

    Registers a class conforming to Reusable for use in creating new table cells.

    Seealso

    register(_:forCellReuseIdentifier:)

    Declaration

    Swift

    public final func register<T: UITableViewCell>(cellType: T.Type) where T: Reusable

    Parameters

    cellType

    The UITableViewCell subclass to register.

  • Mechanica

    Returns a reusable UITableViewCell object for the class inferred by the specified return-type.

    Note

    The cellType parameter can generally be omitted and infered by the return type, except when your type is in a variable and cannot be determined at compile time.

    Seealso

    dequeueReusableCell(withIdentifier:for:)

    Declaration

    Swift

    public final func dequeueReusableCell<T: UITableViewCell>(for indexPath: IndexPath, cellType: T.Type = T.self) -> T where T: Reusable

    Parameters

    indexPath

    The index path specifying the location of the cell.

    cellType

    The cell class to dequeue.

    Return Value

    A Reusable UITableViewCell object.

  • Mechanica

    Returns a reusable UITableViewCell object located by its identifier.

    Note

    The cellType parameter can generally be omitted and infered by the return type, except when your type is in a variable and cannot be determined at compile time.

    Seealso

    dequeueReusableCell(withIdentifier:)

    Declaration

    Swift

    public final func dequeueReusableCell<T: UITableViewCell>(cellType: T.Type = T.self) -> T? where T: Reusable

    Parameters

    cellType

    The cell class to dequeue.

    Return Value

    A Reusable UITableViewCell object or nil;

  • Mechanica

    Registers a nib object containing a cell UITableViewHeaderFooterView subclass conforming to Reusable & NibIdentifiable.

    Seealso

    register(_:forHeaderFooterViewReuseIdentifier:)

    Declaration

    Swift

    public final func register<T: UITableViewHeaderFooterView>(headerFooterViewType: T.Type)
        where T: NibReusable

    Parameters

    headerFooterViewType

    The UITableViewHeaderFooterView subclass to register.

  • Mechanica

    Registers a class conforming to Reusable for use in creating new table header or footer views.

    Seealso

    register(_:forHeaderFooterViewReuseIdentifier:)

    Declaration

    Swift

    public final func register<T: UITableViewHeaderFooterView>(headerFooterViewType: T.Type)
        where T: Reusable

    Parameters

    headerFooterViewType

    The UITableViewHeaderFooterView subclass to register.

  • Mechanica

    Returns a reusable UITableViewHeaderFooterView object for the class inferred by the return-type.

    Note

    The viewType parameter can generally be omitted and infered by the return type, except when your type is in a variable and cannot be determined at compile time.

    Seealso

    dequeueReusableHeaderFooterView(withIdentifier:)

    Declaration

    Swift

    public final func dequeueReusableHeaderFooterView<T: UITableViewHeaderFooterView>(_ viewType: T.Type = T.self) -> T?
        where T: Reusable

    Parameters

    viewType

    The view class to dequeue

    Return Value

    A Reusable UITableViewHeaderFooterView instance.