how to change the color of headertitle in table

Discussion in 'iOS Programming' started by sandhya.rai, Jun 1, 2009.

  1. sandhya.rai macrumors newbie

    Joined:
    Jan 12, 2009
    #1
    Hi,

    I want to know how to change the color of header's title in section of table
    programatically .





    Thanx
    sandhya
     
  2. johnnyjibbs macrumors 68030

    johnnyjibbs

    Joined:
    Sep 18, 2003
    Location:
    London, UK
    #2
    You need to use the UITableViewDelegate method tableView:viewForHeaderInSection:. You can supply it a UILabel object that describes the header text you want for that section and use the label's textColor property to change the colour of the label.

    Contrary to what it says in the description, it works for both plain and grouped table view styles.
     

Share This Page