摘要: ``` @protocol UITableViewDataSource @required // 告诉数据源返回表视图的给定部分中的行数 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section; // 行显示, 实现人员应该“始终”尝试重用单元格,设置每个单元格的reus... 阅读全文
posted @ 2019-06-23 20:02 220和284 阅读(156) 评论(0) 推荐(0) 编辑
摘要: ``` @protocol UITableViewDelegate @optional // cell将要显示的时候调用 - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath; // header将... 阅读全文
posted @ 2019-06-23 20:01 220和284 阅读(462) 评论(0) 推荐(0) 编辑
摘要: ``` NS_CLASS_AVAILABLE_IOS(2_0) @interface UITableView : UIScrollView // 初始化并返回给定框架和样式的表视图对象。必须在创建时指定样式。用UITableViewStylePlain调用这个 - (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle... 阅读全文
posted @ 2019-06-23 19:57 220和284 阅读(156) 评论(0) 推荐(0) 编辑
摘要: UITableView 表视图 是IOS使用非常频繁的布局视图 UITableView 什么样子呢? 一般用在什么地方呢?看下边的图 像是电话薄,好友列表 这种列表排列的视图一般都是使用UITableView实现的 UITableView 一共包含两种内置的布局格式: 1. UITableViewS 阅读全文
posted @ 2019-06-23 19:30 220和284 阅读(362) 评论(0) 推荐(0) 编辑