private UITableViewCell NewListCell(NSString cellId, NSIndexPath indexPath)
{
var cellStyle = UITableViewCellStyle.Subtitle;
var section = Sections[indexPath.Section];
IList<Type> viewTypes = null;
var key = cellId.ToString();
if (section.ViewTypes != null && section.ViewTypes.ContainsKey(key))
{
viewTypes = section.ViewTypes[key];
if (viewTypes != null && !viewTypes.Contains(NavigationViewType))
{
viewTypes.Add(NavigationViewType);
}
}
if (viewTypes == null && NavigationViewType != null)
{
viewTypes = new List<Type>() { NavigationViewType };
}
var cell = new ComposableViewListCell(cellStyle, cellId, indexPath, viewTypes, this);
//If we have a new cell Style then we need to recreate the cell.
if (cellStyle != cell.Style)
cell = new ComposableViewListCell(cell.Style, cellId, indexPath, viewTypes, this);
return cell;
}