I would like to change the font type and font size of a section header in a table view controller.
My code:
func tableView(tableView: UITableView, willDi
C#
Based on Atticus' answer using willDisplayHeaderView
:
public override void WillDisplayHeaderView(UITableView tableView, UIView headerView, nint section)
{
var header = headerView as UITableViewHeaderFooterView;
header.TextLabel.Font = UIFont.FromName("Futura", header.TextLabel.Font.PointSize);
}
Please note that Xamarin is a cross-platform development tool for building iOS Apps using the C# language. The code above is C# and will not work in Xcode. This answer is just for developers who use Xamarin but still want to achieve what the OP also wanted.