1.调用数据源的下面方法得知一共有多少组数据
- (NSInteger)numberOfSectionsInTableView:(UITableView*)tableView;
2.调用数据源的下面方法得知每一组有多少行数据
- (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section;
3.调用数据源的下面方法得知每一行显示什么内容
- (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath;
本文介绍了UITableView中数据源方法的基本使用方法,包括获取数据组数、每组的行数及各行的内容。通过这三个方法,开发者可以实现UITableView的数据绑定。

378

被折叠的 条评论
为什么被折叠?



