public override UIView GetViewForFooter(UITableView tableView, int sectionIndex)
{
if (Sections.Count > sectionIndex && Sections.ContainsKey(sectionIndex))
{
var section = Sections[sectionIndex];
if (section != null)
{
if (section.FooterView == null && !string.IsNullOrEmpty(section.FooterText))
{
section.FooterView = CreateFooterView(tableView, section.FooterText);
}
// Use an empty UIView to Eliminate Extra separators for blank items
if (section.FooterView == null)
{
return new UIView(RectangleF.Empty) { BackgroundColor = UIColor.Clear };
}
return section.FooterView;
}
}
return null;
}