UITableView
public extension UITableView
-
Tableview cell registration with nib file
- Usage:
tableView.register(SomeCell.self)
Declaration
Swift
func registerNib(_ cellClass: AnyClass)
- Usage:
-
Defining cell in cellForRowAt function
- Usage:
let cell = tableView.dequeueReusableCell(SomeCell.self, for: indexPath)
Declaration
Swift
func dequeueReusableCell<Cell>(_ cellClass: Cell.Type, for indexPath: IndexPath) -> Cell where Cell : UITableViewCell
- Usage:
-
Reloads the tableview animated
Declaration
Swift
func reloadData(with animation: UITableView.RowAnimation, duration: TimeInterval = 0.3)
Parameters
animation
Animation type
duration
Animation duration Default: 0.3
-
Reloads the table animated with fade animation
Declaration
Swift
func reloadAnimated()
-
Scroll to top of tableview
Declaration
Swift
func scrollToTop(animated: Bool = true)
Parameters
animated
Animated (Default: true)
-
Check existing of indexpath in tableview
Declaration
Swift
func exist(indexPath: IndexPath) -> Bool
Parameters
indexPath
Target indexpath
Return Value
Result of search