Reputation: 229
I am trying to figure how to change the color of the background of a plain uitableview after the using has scrolled past the top or bottom of the table. Not sure what its called but if you look at the mail app, if you scroll down, whilst already at the top of the table, the background is a dark gray color with a slight gradient. Anyone know how i go about implementing this?
Upvotes: 2
Views: 1487
Reputation: 13180
tableview.backgroundColor = [UIColor clearColor]; // you can write any color in place of clear color
Upvotes: 0
Reputation: 26390
tableView.backgroundColor = [UIColor redColor];
will provide a red color background for your table view
Other options include
tableView.backgroundColor = [UIColor colorWithPatternImage:anImage];
tableView.backgroundColor = [UIColor colorWithRed: green: blue: alpha: ];
tableView.backgroundColor = [UIColor colorWithHue: saturation: brightness: alpha: ];
tableView.backgroundColor = [UIColor colorWithCGColor:cgColor];
Upvotes: 2