0

I have added custom section header for Plain UITableView in my app. While scrolling my cells goes behind section header. I want section header to be displayed on screen till section doesn't change. Till now my app works as per my requirement.

What I want is , when table cell goes behind my section header , I want to change the background color of the section header & change the text color of section title, so that user can clearly see the cells contents.

How can I implement above functionality ? Any kind of help is highly appreciated.Thanks.

iOSAppDev
  • 2,755
  • 4
  • 39
  • 77

1 Answers1

0

How are you returning your "custom section header" for your UITableView?

If you have a delegate set for your UITableView, you can return your custom section header via the delegate's tableView: viewForHeaderInSection: method, where you can return any UIView you want (e.g. a UILabel, where you control the font color and the background color). I've linked Apple's documentation for you.

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • Thanks for reply. I am using same delegate method. Also I am returning UILabel from above method. But I want background color & text color for UILabel changes only when section header covers my cell. Meaning when my cell goes behind my section header. – iOSAppDev Jun 17 '12 at 12:19