UITableView
public extension UITableView
-
Returns first section’s first row index path. If table view has zero sections returns (NSNotFound, NSNotFound). Invalid for scrolling. If table view has zero cells for the first section returns (0, NSNotFound) and this index path is valid for scrolling.
Declaration
Swift
var firstRowIndexPath: IndexPath { get }
-
Returns last row index path or NSNotFound If table view has zero sections returns (NSNotFound, NSNotFound). Invalid for scrolling. If table view has zero cells for the last section returns (section, NSNotFound) and this index path is valid for scrolling.
Declaration
Swift
var lastRowIndexPath: IndexPath { get }
-
Simplifies cell registration. Xib name must be the same as class name.
Declaration
Swift
func registerNib(class: UITableViewCell.Type)
-
Simplifies cell dequeue.
Declaration
Swift
func dequeue<T>(_ class: T.Type, for indexPath: IndexPath) -> T where T : UITableViewCell
Parameters
class
Cell’s class.
indexPath
Cell’s index path.
-
Simplifies configurable cell dequeue.
Declaration
Swift
typealias ConfigurableCell = UITableViewCell & Configurable
-
Undocumented
Declaration
Swift
func dequeueConfigurable(class: ConfigurableCell.Type, for indexPath: IndexPath) -> ConfigurableCell
-
Simplifies header/footer registration. Xib name must be the same as class name.
Declaration
Swift
func registerNib(class: UITableViewHeaderFooterView.Type)
-
Simplifies header/footer dequeue.
Declaration
Swift
func dequeue<T>(_ class: T.Type) -> T where T : UITableViewHeaderFooterView
Parameters
class
Header or footer class.
-
Assures content offeset won’t change after reload
Declaration
Swift
@available(*, renamed: "reloadDataKeepingBottomContentOffset") func reloadDataKeepingContentOffset()
-
Assures bottom content offeset won’t change after reload
Declaration
Swift
func reloadDataKeepingBottomContentOffset()
-
Assures content offeset won’t change after updating cells size
Declaration
Swift
func updateCellSizesKeepingContentOffset()
-
IndexPaths of visible cells
Declaration
Swift
var visibleIndexPaths: [IndexPath] { get }