推 appleway: yes, you can do it. 02/15 15:26
推 www16852: 建立兩個cell class? 02/15 16:39
→ www16852: 然後在data source的cellForItemAtIndexPath 02/15 16:42
→ www16852: 加上if let cell as? cellTwo{} 02/15 16:42
→ www16852: 這樣吧 02/15 16:42
→ www16852: 阿 我是用swift 你在看看@@ 02/15 16:43
→ LFimi: 在cellForRowAtIndexPath判斷條件 return 不同的 cell 02/15 18:25
→ LFimi: 你舉的例子大概就是 if (indexPath.row <=1) ... else ... 02/15 18:28
感謝各位,問題已經順利解決了
後來用
UITableViewCell *cell;
if (indexPath.section == 1 && (indexPath.row == 0 || indexPath.row == 1))
cell = [tableView dequeueReusableCellWithIndentifier:@"cellOne"];
else
cell = [tableView dequeueReusableCellWithIndentifier:@"cellTwo"];
來處理
※ 編輯: satou20444 (203.70.195.104), 02/16/2016 08:25:08