<<  < 2016 - >  >>
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31





直接来实现表格协议的方法吧
实现协议  UITableViewDataSource、UITableViewDelegate
UITableView必须用到的三个方法

1.提供表格有多少个分组(默认表格是一个分组)
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

2.提供指定的分组有多少行
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section

3.提供表格单元格的内容
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

其他的有
4.提供行高(默认行高:4
……
首页 上一页 下一页 尾页 页次:1/1页  10篇日志/页 转到:
天涯博客欢迎您!