IOS Introduction
Swift UI Label
Swift UI Button
Swift UI Text Field
Swift UI Slider
Swift UI Switch
Swift UI Stepper
Swift UI Date Picker
Swift UI Segmented Control
Table View
Collection Views
iOS Content View
iOS View Controllers
iOS Bar interface
iOS Navigation interface
iOS Architect Pattern
iOS Libraries
iOS Web request and parsing
iOS user defaults
iOS Coredata and database

Table View Controller

Table View Controller

It's used to show a vertically scrollable view made up of a bunch of cells (generally reusable cells). It has unique elements like headers, footers, rows, and sections.

A TableViewController is a ViewController that is dedicated to controlling the tableview. The TableViewController is in charge of keeping track of the table's data and events, and it accomplishes this by utilizing the delegate and DataSource of its tableview property. The TableViewController is a subclass of UIViewController that inherits the UITableViewController class.

  • Data is delegated by Important Properties.
    Source\srowHeight\ssectionFooterHeight\ssection HeaderHeight\sseparatorColor\stable HeaderView\stable FooterView

Important Methods

- (UITableViewCell *)cellForRowAtIndexPath:(NSIndexPath *)indexPath - (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation - (id)dequeueReusableCellWithIdentifier:(NSString *)identifier - (id)dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath - (void)reloadData - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation - (NSArray *)visibleCells
  • The UITableViewController offers the following features in addition to the tableview.
  • It accesses the tableview stored in the storyboard or nib file. The tableview property of the TableViewController is used to access the storyboard tableview.
  • By default, it follows the UITableViewDelegate and UITableViewDatasource protocols. To provide the tableview implementation, the subclass overrides the delegate and DataSource methods.
  • The initial appearance in the viewWillAppear(: ) function immediately reloads the data for its tableview. Every time the tableview is presented, it clears the selection.
  • When the user hits an edit| done button in the navigation bar, it automatically toggles the table's edit mode..
  • When the onscreen keyboard appears or disappears, it immediately resizes the tableview.