//public override nfloat GetHeightForRow(UITableView tableView, NSIndexPath indexPath) //{ // var list = Challenge != null ? Challenge.AnswerList : null; // ChallengeAnswerModel answer = list != null ? list[indexPath.Row] : null; // MultipleChoiceTableViewCell cell = (MultipleChoiceTableViewCell)tableView.DequeueReusableCell(MultipleChoiceTableViewCell.ClassName); // MultipleChoiceTableView table = tableView as MultipleChoiceTableView; // return cell.ImageView.Frame.Height; // //return base.GetHeightForRow(tableView, indexPath); //} public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { MultipleChoiceTableView table = tableView as MultipleChoiceTableView; table.SelectedRow = indexPath.Row; table.ReloadData(); }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { var list = Challenge != null ? Challenge.AnswerList : null; ChallengeAnswerModel answer = list != null ? list[indexPath.Row] : null; MultipleChoiceTableViewCell cell = (MultipleChoiceTableViewCell)tableView.DequeueReusableCell(MultipleChoiceTableViewCell.ClassName); MultipleChoiceTableView table = tableView as MultipleChoiceTableView; cell.UpdateCellData(answer, table.SelectedRow == indexPath.Row); return(cell); }