public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
{
UITableViewCell cell = tableView.DequeueReusableCell (cellIdentifier);
if (cell == null) {
cell = new UITableViewCell (UITableViewCellStyle.Default, cellIdentifier);
cell.ImageView.Image = icon;
}
var names = devices;
try {
var name = names [indexPath.Row];
var device = AirPlayBrowser.GetDevice (name);
cell.TextLabel.Text = device == null ? String.Empty : device.Name;
}
catch {
// if we're unlucky
return null;
}
return cell;
}