I am trying to change the color of Table section on tableView. I was able to successfully change the color on Android.
I used GetRenderer on android to override the tablesection.
protected override Xamarin.Forms.Platform.Android.TableViewModelRenderer GetModelRenderer(Android.Widget.ListView listView,
Xamarin.Forms.TableView view)
{
return new CustomTableViewModelRenderer(Context, listView, view);
}
Is there a similar method on iOS ? I am trying to set ModelRender for tableView. How do I call the below renderer from IOS ?
public class CustomTableViewModelRenderer : TableViewModelRenderer
{
public CustomTableViewModelRenderer(TableView model)
: base(model)
{
}
public override UIView GetViewForHeader (UITableView tableView, nint section)
{
UILabel headerLabel = new UILabel(); // Set the frame size you need
headerLabel.TextColor = UIKit.UIColor.FromRGB(1, 83, 157);
return headerLabel;
}
}