UITableView

  • SwifterSwift: Index path of last row in tableView.

    Declaration

    Swift

    public var indexPathForLastRow: IndexPath?
  • SwifterSwift: Index of last section in tableView.

    Declaration

    Swift

    public var lastSection: Int
  • SwifterSwift: Number of all rows in all sections of tableView.

    Declaration

    Swift

    public func numberOfRows() -> Int

    Return Value

    The count of all rows in the tableView.

  • SwifterSwift: IndexPath for last row in section.

    Declaration

    Swift

    public func indexPathForLastRow(inSection section: Int) -> IndexPath?

    Parameters

    section

    section to get last row in.

    Return Value

    optional last indexPath for last row in section (if applicable).

  • Reload data with a completion handler.

    Declaration

    Swift

    public func reloadData(_ completion: @escaping () -> Void)

    Parameters

    completion

    completion handler to run after reloadData finishes.

  • SwifterSwift: Remove TableFooterView.

    Declaration

    Swift

    public func removeTableFooterView()
  • SwifterSwift: Remove TableHeaderView.

    Declaration

    Swift

    public func removeTableHeaderView()
  • SwifterSwift: Scroll to bottom of TableView.

    Declaration

    Swift

    public func scrollToBottom(animated: Bool = true)

    Parameters

    animated

    set true to animate scroll (default is true).

  • SwifterSwift: Scroll to top of TableView.

    Declaration

    Swift

    public func scrollToTop(animated: Bool = true)

    Parameters

    animated

    set true to animate scroll (default is true).

  • SwifterSwift: Dequeue reusable UITableViewCell using class name

    Declaration

    Swift

    public func dequeueReusableCell<T: UITableViewCell>(withClass name: T.Type) -> T?

    Parameters

    name

    UITableViewCell type

    Return Value

    UITableViewCell object with associated class name (optional value)

  • SwiferSwift: Dequeue reusable UITableViewCell using class name for indexPath

    Declaration

    Swift

    public func dequeueReusableCell<T: UITableViewCell>(withClass name: T.Type, for indexPath: IndexPath) -> T?

    Parameters

    name

    UITableViewCell type.

    indexPath

    location of cell in tableView.

    Return Value

    UITableViewCell object with associated class name.

  • SwiferSwift: Dequeue reusable UITableViewHeaderFooterView using class name

    Declaration

    Swift

    public func dequeueReusableHeaderFooterView<T: UITableViewHeaderFooterView>(withClass name: T.Type) -> T?

    Parameters

    name

    UITableViewHeaderFooterView type

    Return Value

    UITableViewHeaderFooterView object with associated class name (optional value)

  • SwifterSwift: Register UITableViewHeaderFooterView using class name

    Declaration

    Swift

    public func register<T: UITableViewHeaderFooterView>(nib: UINib?, withHeaderFooterViewClass name: T.Type)

    Parameters

    nib

    Nib file used to create the header or footer view.

    name

    UITableViewHeaderFooterView type.

  • SwifterSwift: Register UITableViewHeaderFooterView using class name

    Declaration

    Swift

    public func register<T: UITableViewHeaderFooterView>(headerFooterViewClassWith name: T.Type)

    Parameters

    name

    UITableViewHeaderFooterView type

  • SwifterSwift: Register UITableViewCell using class name

    Declaration

    Swift

    public func register<T: UITableViewCell>(cellWithClass name: T.Type)

    Parameters

    name

    UITableViewCell type

  • SwifterSwift: Register UITableViewCell using class name

    Declaration

    Swift

    public func register<T: UITableViewCell>(nib: UINib?, withCellClass name: T.Type)

    Parameters

    nib

    Nib file used to create the tableView cell.

    name

    UITableViewCell type.

  • SwifterSwift: Register UITableViewCell with .xib file using only its corresponding class. Assumes that the .xib filename and cell class has the same name.

    Declaration

    Swift

    public func register<T: UITableViewCell>(nibWithCellClass name: T.Type, at bundleClass: AnyClass? = nil)

    Parameters

    name

    UITableViewCell type.

    bundleClass

    Class in which the Bundle instance will be based on.