#tableView在创建的时候会调用<UITableViewDataSource,UITableViewDelegate>里面的方法,具体调用步骤如下
1.有多少组
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
2.第section组头部控件有多高
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
3.第section组有多少行
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
4.indexPath这行的cell有多高
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
5.indexPath这行的cell长什么样子 这个在tableView滚动的时候,遇到一个新的cell就不不断的调用
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
6.第section组头部显示什么控件
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section