Different background colors for the top and bottom of a UITableView
Posted
by Aaron Brethorst
on Stack Overflow
See other posts from Stack Overflow
or by Aaron Brethorst
Published on 2009-07-11T20:37:24Z
Indexed on
2010/03/18
17:11 UTC
Read the original article
Hit count: 263
iphone
|uitableview
If you look at your Inbox in iPhone OS 3.0's Mail app, you'll see that swiping down displays a grayish background color above the UISearchBar.
Now, if you scroll down to the bottom of the table, you'll see that the background color at that end is white.
I can think of a couple ways of solving this problem, but they're pretty hacky:
- Change the table view's background color depending on the current scrollOffset by overriding -scrollViewDidScroll:
- Give the UITableView a clear background color and then set its superview's backgroundColor to a gradient pattern image.
Does anyone know what the "best practice" solution is for this problem? thanks.
© Stack Overflow or respective owner