-1
在我的故事板中,我創建了兩個不同的原型單元格cell1和cell2。我希望他們出現在我的tableView這樣的:在表格視圖中替換兩個不同的自定義單元格佈局
的TableView
prototype cell1 - indexpath.row[0]
prototype cell2 - indexpath.row[1]
prototype cell1 - indexpath.row[2]
prototype cell2 - indexpath.row[3]
and so on...
我if
和switch
語句和for
循環試驗中cellForRowAtIndexPath:
,但無法得到它的權利。然後我在這裏和互聯網上搜索,但仍然無法找到答案。希望有人能解釋給我?