I want to override the below method in the custom renderer. All i want to do is show or hide the checkmark on select and deselect.
public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
{
// Do something
}
Custom Renderer code below
public class StandardViewCellRenderer : ViewCellRenderer
{
public override UIKit.UITableViewCell GetCell(Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv)
{
var cell = base.GetCell(item, reusableCell, tv);
switch (item.StyleId)
{
case "checkmark":
cell.Accessory = UIKit.UITableViewCellAccessory.Checkmark;
break;
default:
cell.Accessory = UIKit.UITableViewCellAccessory.DisclosureIndicator;
break;
}
return cell;
}
i want to do something like below. What method should i override to achieve this.
public override UIKit.UITableViewCell RowSelected(Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv)
{
var cell = base.GetCell(item, reusableCell, tv);
cell.Accessory=UIKit.UITableViewCellAccessory.Checkmark;
return cell;
}
}
How to achieve this?