public override float GetHeightForFooter(UITableView tableView, int sectionIndex)
{
if (Sections.Count > sectionIndex && Sections.ContainsKey(sectionIndex))
{
var section = Sections[sectionIndex];
if (section != null && !string.IsNullOrEmpty(section.FooterText))
{
var indentation = UIDevice.CurrentDevice.GetIndentation();
var width = tableView.Bounds.Width - (indentation * 2);
using (var footerLabel = new UILabel())
{
footerLabel.Font = UIFont.SystemFontOfSize(15);
var size = footerLabel.StringSize(section.FooterText, footerLabel.Font);
var height = size.Height * (footerLabel.Font.NumberOfLines(section.FooterText, width)) + 1;
return height;
}
}
}
//if greater than 0 then the empty footer will display and prevent empty rows from displaying
return 1;
}