示例#1
0
 public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
 {
     if (indexPath.Row == tableData.Count)
     {
         UITableViewCell cell = tableView.DequeueReusableCell(OSSignOutCellId, indexPath);
         cell.AdjustFrame(0, 0, 0, 20);
         return(cell);
     }
     else
     {
         OSProfileCell cell = (OSProfileCell)tableView.DequeueReusableCell(OSProfileTableViewCellId, indexPath);
         cell.ProfileLabel.Text = tableData [indexPath.Row].Label;
         if (tableData [indexPath.Row].Label == "Emergency Contact" && cell.ProfileLabel.Frame.X != 20)
         {
             cell.ProfileLabel.AdjustFrame(-39, 0, 39, 0);
         }
         else if (tableData [indexPath.Row].Label == "We need your help!\nPlease provide emergency contact." && cell.ProfileLabel.Frame.Height != 36)
         {
             cell.ProfileLabel.Lines = 2;
             cell.ProfileLabel.AdjustFrame(0, -9, 30, 15);
         }
         cell.IconImage.Image      = tableData [indexPath.Row].Icon;
         cell.PhoneIconImage.Image = tableData [indexPath.Row].PhoneIcon;
         return(cell);
     }
 }