tableView代理方法的执行顺序

代理 先判断 1.  有几个section 2. 每个section 多少个cell

如果  

设置的值都为0  那么就不执行 

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{}

这个方法了

 

 

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{

    

    NSLog(@"numberOfRowsInSection返回0时候就不用执行cellForRowAtIndexPath"); 

    return  0;

原文地址:https://www.cnblogs.com/zander/p/2585782.html