UITableView

public extension UITableView
  • Registers a cell to be used by a UITableView.

    Declaration

    Swift

    func register<T>(cell cellType: T.Type) where T : UITableViewCell, T : NibLoadable

    Parameters

    cellType

    A nibloadable table view cell type to take the identifier and nib from.

  • Registers a header to be used by a UITableView.

    Declaration

    Swift

    func register<T>(header headerType: T.Type) where T : UITableViewHeaderFooterView, T : NibLoadable

    Parameters

    headerType

    A nibloadable table view header-footer view type to take the identifier and nib from.

  • Registers a footer to be used by a UITableView.

    Declaration

    Swift

    func register<T>(footer footerType: T.Type) where T : UITableViewHeaderFooterView, T : NibLoadable

    Parameters

    footerType

    A nibloadable table view header-footer view type to take the identifier and nib from.

  • Returns a reusable cell of the type specified to be used by a UITableView.

    Declaration

    Swift

    func dequeue<T>(cell cellType: T.Type) -> T? where T : UITableViewCell

    Parameters

    cellType

    A table view cell to take the identifier from.

  • Returns a reusable cell of the type specified to be used and adds it to the UITableView in the indexPath specified.

    Declaration

    Swift

    func dequeue<T>(cell cellType: T.Type, for indexPath: IndexPath) -> T? where T : UITableViewCell

    Parameters

    cellType

    A table view cell to take the identifier from.

    indexPath

    IndexPath where to add the cell to the table view.

  • Returns a reusable header of the type specified to be used in the UITableView.

    Declaration

    Swift

    func dequeue<T>(header headerType: T.Type) -> T? where T : UITableViewHeaderFooterView

    Parameters

    headerType

    A table view header view to take the identifier from.

  • Returns a reusable footer of the type specified to be used in the UITableView.

    Declaration

    Swift

    func dequeue<T>(footer footerType: T.Type) -> T? where T : UITableViewHeaderFooterView

    Parameters

    footerType

    A table view footer view to take the identifier from.