簡單代碼設置titleForHeaderInSection

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{


    if (section==0) {

        return @"今天";

    }

    else if(section==1){

    return @"昨天";

    

    }

    else{

    

    return @"更早以前";

    }


}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章