I. UITableView table View creation
1> Basic properties:UITableView inherits from Uiscrollview, so you can scroll
Every piece of data in the table view is displayed in the UITableViewCell object
Table views can be partitioned to display data, each partition is called a section, each row is called row, and the number is from 0
2> Important usage:
The most important is two agent methods <UITableViewDelegate,UITableViewDataSource> (which must be achieved by Numberofrows, Cellforrowatindexpath)
section represents a partition, row: Represents a row within a partition, and the cell represents the contents of a row
Datesource Proxy method
Proxy methods for delegate
Example code:
Create a standard six-step UITableView
Steps to create a VIEWCONTROLLER.M file
Two. Reuse mechanism for table views
UITableView relies on mutableset to implement reuse functions
cell will be added to Mutableset, enter the screen cell first from set gets, if not obtained, creates a cell. In cell before showing Span style= "FONT-WEIGHT:300; Color: #ff2600; " >cell fu the appropriate content.
Cell reuseidentifier is the key to reuse. (Use a finite cell to recycle, which is reuse)
The following is the embodiment of the cell reuse mechanism: (It is important to make a judgment, first from the reuse pool, if not obtained, create a cell)
Three. Related configuration methods for table views
1>: Setting the contents or picture of a cell
2>: Sets the height of the cell, the partition, and the height of the head foot
3> Returns the Kinsoku view, and the row's Click Trigger Event
UI Nineth speaking. UITableView table View creation, table view reuse mechanism, table view related configuration method