0
私は2〜3のセクションを持つUITableViewを持っています。私は、各セクションの1行を選択できる機能を実装したいと考えています。すべてのUITableViewSection iOS用の単一の選択Xamarin
そうような何か: - 私はのUITableView上で複数選択を可能にしようとしている
。しかし、それは私がすべてのセクションから複数の行を選択することができます。私はすべてのセクションから一度に1つの行だけを選択したい。
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
var cell = tableView.CellAt(indexPath);
if (cell.Accessory == UITableViewCellAccessory.None)
{
cell.Accessory = UITableViewCellAccessory.Checkmark;
}
else
{
cell.Accessory = UITableViewCellAccessory.None;
}
selectedSection = indexPath.Section;
}
public override void RowDeselected(UITableView tableView, NSIndexPath indexPath)
{
var cell = tableView.CellAt(indexPath);
cell.Accessory = UITableViewCellAccessory.None;
}