如何使用 monotouch 在 UITableView 中获得交替的行颜色?
我目前正在使用以下方法填充我的 TableView:
public partial class myViewController : UITableViewController
{
public static UINavigationController navigationController;
public static IntPtr handle;
public CompanyViewController (IntPtr handle) : base (handle)
{
}
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
Services service = new Services();
var myList = service.GetList(param1);
List<string> list = new List<string>();
foreach(var c in myList)
{
list.Add (c.Name);
}
navigationController = NavigationController;
handle = Handle;
var source = new CompanyTableSource(list);
myTableView.Source = source;
}