Chapter 1: IOS Table View
Table is very important in IOS application development. Now let's take a look.
1. First, let's take a look at the Table's view structure.
- Table header view: the top view of the table view, used to display information of the table view, such as refreshing information of the table view.
- Table footer view: the bottom view of the table view, which is used to display information about the table view. For example, when the table view is displayed on pages, more information is displayed.
- Cell: it is the unit view of each row in the table view.
- Section: it consists of multiple cells, including the section header and section footer ).
- Section header: The section header, which describes the section information, as shown in 4-3. The text is left aligned.
- Footer: The footer of the knot. It can also describe the information and declaration of the knot, as shown in 4-3. The text is centered and aligned.
2. After reading the presentation structure, let's look at the structure in the code.
- UITableView inherits from UIScrollView
- There are two Protocols: UITableVIewDelegate and UITableViewDataSource.
- UITableVIewController is a controller,
- UITbaleViewHeaderFooterView is used as the end view of the table header.
- UITableViewCell is the column of the custom table in the table.
3. Table view Classification
- Normal table view,
It is mainly used for Dynamic tables, while dynamic tables are generally used when the number of cells is unknown.
- Group Table view,
It is generally used for static tables for interface layout and group management.