0
3つのセル、1つの列の2つのセル、2つの列の1つのセルがあるテーブルビューがあります。 tableviewセルに2つのイメージを持つセルの場合は、indexPathを変更する必要があります。 助けていただければ幸いです。複数の列を持つセルと1つの列のみを持つ2つのセルを持つ複数のセルでtableviewを使用したい
3つのセル、1つの列の2つのセル、2つの列の1つのセルがあるテーブルビューがあります。 tableviewセルに2つのイメージを持つセルの場合は、indexPathを変更する必要があります。 助けていただければ幸いです。複数の列を持つセルと1つの列のみを持つ2つのセルを持つ複数のセルでtableviewを使用したい
You can use this code to shoe differnt cells:-
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
if indexPath.row = 0 // First Cell
{
let cell = tableView.dequeueReusableCellWithIdentifier(“YourCell”, forIndexPath: indexPath) as! YourCell
return cell
}
else if indexPath.row = 1 // Second Cell
{
let cell = tableView.dequeueReusableCellWithIdentifier(“YourCellWithTwoImages”, forIndexPath: indexPath) as! YourCellWithTwoImages
return cell
}
// Add Condtions for cells
}