forum

Home / DeveloperSection / Forums / Alternating row colors in UITableView

Alternating row colors in UITableView

Anonymous User 2294 31-Jan-2014

How do I get alternating row colors in a UITableView using monotouch?

I am currently populating my TableView using this:

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;
        }

c# c# 
Updated on 31-Jan-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By