public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { if (Customers.Count == 0) { if (State == SearchState.Searching) { var spinner = new MonoTouch.Dialog.ActivityElement(); return(spinner.GetCell(tableView)); } var c = (tableView.DequeueReusableCell("default") ?? new UITableViewCell(UITableViewCellStyle.Value1, "default")); c.TextLabel.Text = State == SearchState.Error ? "There was an eror searching. Please try again" :"No Results"; return(c); } var cell = tableView.DequeueReusableCell <CustomerCell> (CustomerCell.Key); cell.Customer = Customers [indexPath.Row]; return(cell); }
public override UITableViewCell GetCell(UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { if (Customers.Count == 0) { if (State == SearchState.Searching) { var spinner = new MonoTouch.Dialog.ActivityElement (); return spinner.GetCell (tableView); } var c = (tableView.DequeueReusableCell ("default") ?? new UITableViewCell (UITableViewCellStyle.Value1, "default")); c.TextLabel.Text = State == SearchState.Error ? "There was an eror searching. Please try again" :"No Results"; return c; } var cell = tableView.DequeueReusableCell<CustomerCell> (CustomerCell.Key); cell.Customer = Customers [indexPath.Row]; return cell; }