, , xib . .
public static MyTableCell Create()
{
NSArray topLevelObjects = NSBundle.MainBundle.LoadNib("MyTableCell", null, null);
MyTableCell cell = Runtime.GetNSObject(topLevelObjects.ValueAt(0)) as MyTableCell;
return cell;
}
Xamarin. , UINib ( , Xamarin Studio ).
GetCell
public override UITableViewCell GetCell (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
{
var cell = (MyTableCell) tableView.DequeueReusableCell(_cellIdentifier);
if (cell == null)
cell = MyTableCell.Create();
cell.UpdateCell(indexPath, _names[indexPath.Item]);
return cell;
}
[Register("MyTableCell")] .cs XIB, . MyTableCell XIB .
Xamarin ( , iOS), .