//联系人:石虎QQ: 1224614774昵称:嗡嘛呢叭咪哄
一、概念规范
//建议这样写
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.row ==0)return44;
if(indexPath.row ==1)return80;
if(indexPath.row ==2)return50;
return44;
}
//而不是
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.row ==0) {
return44;
}elseif(indexPath.row ==1){
return80;
}elseif(indexPath.row ==2){
return50;
}else{
return44;
}}