Table View Styles and Accessory View |
Table View StylePlain StyleGroup Style其实plain通常用于显示同类的一连贯数据,而Group更适合于用来显示不同类型的数据。其中plain能有indicator,而group不能有。 |
Standard Style for Table View CellsUITableView提供四种默认的Cell样式:UITableViewCellStyleDefaultUITableViewCellStyleSubtitle UITableViewCellStyleValue1UITableViewCellStyleValue2UITableViewCellStyleDefault:![]() ![]() UITableViewCellStyleSubtitle :![]() ![]() ![]() ![]() ![]() ![]() |
Accessory ViewsUITableCell提供三种默认的附件:![]() ![]() |
Overview of the Table View API |
Table View |
Table View ControllerUITableViewController自动集成了一个UITableView,所以若需求是一个连续的Table界面,可以直接使用它。 |
Data Source and Delegate |
Extension to the NSIndexPath ClassUITableView通过category的方式扩展了NSIndePath,使其具备row & section属性来更好地定位TableView的item |
Table View Cells |
Navigating a Data Hierarchy with Table ViewsUITableView一个最为通用的用法就是用来导航浏览一个具有层级关系的数据 |
Hierarchical Data Models and Table View |
View Controller and Navigation-Based Apps |
Design pattern for Navigation-Based Apps |
Creating and Configuring a Table View |
Basic of Table View Creation![]() ![]() |
A Closer Look at Table View CellsUITableViewCell设计如下:![]() ![]() ![]() ![]() |
Managing Selections |
Inserting and Deleting Rows and Sections当Cell处于编辑模式,我们可以实现row与section的inset、delete、reorder,批处理四种效果。以下为client触发编辑模式并进行删除或者插入操作的时序图(时序图的执行顺序是从上而下):![]() ![]() |
Batch Insertion ,Deletion,and Reloading of rows and section![]() ![]() |
Managing the reordering of rows![]() ![]() tableView:moveRowAtIndexPath:toIndexPath: 更新model。 |
新闻热点
疑难解答