I have added a Prototype cell to my UITableView
which has a UISwitch
and an UILabel
. When I run the app the UISwitch and UILabel display fine as expected, but some how I can not interact with the UISwitch. I can not toggle it between On or Off.
I have also tried creating a separate UITableViewCell and implementing the same UI. Still I have the same issue.
I am inflating the Cell as follows :-
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
{
RatingTableCell cell = tableView.DequeueReusableCell("RatingTableCell") as RatingTableCell;
if (choiceList != null && choiceList.Count > 0)
{
cell.UpdateCellchoiceList.ElementAt(indexPath.Row));
}
else
{
//Do something else
}
return cell;
}
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
var cell = tableView.CellAt(indexPath);
}
EDIT
The whole cell is also not getting clicked. If I just add a label without the UISwitch the cell click works fine.