I want to display data on table view cell from database so i want to give the color to cell according to data means for 1st cell gray then next two cell in brown again i want display gray cell,
so can any one tell me what is the simplest procedure for it.

"give the color to cell according to data (from database)" - no reasons for downvote. "1st cell gray then next two cell in brown again i want display gray cell" - only for example
–
5hrpMay 10 '11 at 5:53

Mitesh Khatri's answer worked for me, although I changed the order of colors used to white as the second color as seen below for what I thought was a better UI. I also used a uicolor generator at www.UIColor.org to find just the right color for my needs. Hopes this helps.