Я следовал за this учебным пособием, чтобы создать пользовательскую ячейку.Monotouch iphone custom UITableView
Я создал пользовательскую ячейку в Interface Builder, который выглядит так:
В моей ViewController я добавил UITableView и привязать его к данным:
myTable.Source = new ListSource();
Метод GetCell из ListSource:
public override UITableViewCell GetCell (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
{
// Reuse a cell if one exists
CustomListCell cell = tableView.DequeueReusableCell ("QCell") as CustomQuestionsListCell;
if (cell == null)
{
// We have to allocate a cell
var views = NSBundle.MainBundle.LoadNib ("CustomListCell", tableView, null);
cell = Runtime.GetNSObject (views.ValueAt (0)) as CustomListCell;
}
return cell;
}
проблема заключается в том, что дисплей в конце концов выглядит следующим образом:
Похоже, что какой-то более притирки. Любые идеи, почему это происходит?
Спасибо!
Спасибо! Это решило мою проблему :) –