I am creating an custom control to display a list of accordions. On click of each accordion item it expands and displays the elements within. For this I have created a custom view renderer and I am using UiTableViewSource to build the list.
I have created Content view for Accordion header and Accordion item. The problem I am facing is I am unable to convert a Xamarin Forms Cell/View to Native cell view.
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
{
NativeiOSViewCell cell = tableView.DequeueReusableCell(cellIdentifier) as NativeiOSViewCell;
var item = Items[indexPath.Section].ChildItems[indexPath.Row] as OverviewFilterViewCell;
if (cell == null)
cell = new NativeiOSViewCell(cellIdentifier, item.View);
return cell;
}
Basically I want to convert the Xamarin Forms Cell to equivalent Native Cell instead of recreating it again. An example :