In iOS 5 and below, to customize the background color and text color of a UITableView’s header or footer, we needed to create a custom UIView then return it from the following delegate methods:

In iOS 6 and iOS 7, as well as iOS 8, we do not need a custom UIView. We can now set the colors (and possibly other attributes) using the new APIs. Refer to the code below to see how to do it.

Happy Goals for iOS

Happy Goals for iOS

Want an app to help you track and achieve your goals, without the complex stuff, saving you from headaches? Checkout Happy Goals - Habits & Goals Tracker now in the App Store! Happy Goals has been featured in the App Store in over 32 countries. Start now, better late than never!

 

Thank you!

%d bloggers like this: