UITableView

extension UITableView
  • Register a cell view type that implements ReusableView protocol.

    Declaration

    Swift

    public func register<T>(_: T.Type) where T : UITableViewCell, T : ReusableView

    Parameters

    _

    the cell class to register (ignored)

  • Register a cell view type that implements the NibLoadableView protocol.

    Declaration

    Swift

    public func register<T>(_: T.Type) where T : UITableViewCell, T : NibLoadableView, T : ReusableView

    Parameters

    _

    the cell class to register (ignored)

  • Obtain a cell view to use to render cell content in a collection view.

    Declaration

    Swift

    public func dequeueReusableCell<T: UITableViewCell>(at indexPath: IndexPath) -> T
    where T: ReusableView

    Parameters

    indexPath

    the location of the cell that is being rendered

    Return Value

    instance of a T class

  • Obtain a cell view for the given index.

    Declaration

    Swift

    public func cellForRow<T>(at indexPath: IndexPath) -> T? where T : UITableViewCell, T : ReusableView

    Parameters

    indexPath

    the location of the cell to return

    Return Value

    optional cell instance (nil if index path is out of bounds)