Ios uitableview返回2单元标识符

Ios uitableview返回2单元标识符,ios,uitableview,xamarin.ios,Ios,Uitableview,Xamarin.ios,我有两个牢房: 像taskcella,taskcellb 但它只动态返回1个单元格数据 是否可以添加和返回多个CellIdentifier public override UITableViewCell GetCell (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { // in a Storyboard, Dequeue will ALWAYS return a ce

我有两个牢房:

像taskcella,taskcellb

但它只动态返回1个单元格数据

是否可以添加和返回多个CellIdentifier

 public override UITableViewCell GetCell (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
        {
          // in a Storyboard, Dequeue will ALWAYS return a cell, 
          UITableViewCell cell = tableView.DequeueReusableCell (cellIdentifier);
          cell.TextLabel.Text = "Görev : " + tableItemsX[indexPath.Row].Gorev;

          UITableViewCell celld = tableView.DequeueReusableCell (cellIdentifierd);
          celld.TextLabel.Text = "İşlem : " + tableItemsX[indexPath.Row].Gorev;
          return celld;    return cell;
        }

这是首先返回的代码,首先返回

首先确保在您的
TableViewSource
中覆盖方法
RowsInSection
,并且它返回
2

    public override int RowsInSection(UITableView tableview, int section)
    {
        return 2;
    }
然后用下一种方法重写您的
GetCell
方法

public override UITableViewCell GetCell (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
{
    if (indexPath.Row == 0)
    {
        UITableViewCell cell = tableView.DequeueReusableCell (cellIdentifier);
        cell.TextLabel.Text = "Görev : " + tableItemsX[indexPath.Row].Gorev;

        return cell;
    }
    else
    {
        UITableViewCell celld = tableView.DequeueReusableCell (cellIdentifierd);
        celld.TextLabel.Text = "İşlem : " + tableItemsX[indexPath.Row].Gorev;

        return celld;    
    }
}

有一个简单的问题,是否可以在左边添加拇指图片?在这行中?使用
cell.ImageView
设置图像