UITableViews

iDeveloperziDeveloperz Member Posts: 1,169
edited November -1 in Introductions
Hi guys I know this the GS forum but the developer ones are down, does anybody know how to change the text color in a UITableView, in the ViewDidLoad protocol?

Comments

  • rebumprebump Member Posts: 1,058
    Well, I recall a "label" view, whose parent is a UIView to use these to set colors:

    `[myView setTextColor:[UIColor whiteColor]];`

    and for background:

    `[myView setBackgroundColor:[UIColor blackColor]];`

    Most UI views/controls are descendants of UIView, so maybe something similar for the UITableView?
  • ORBZORBZ Member Posts: 1,304
    ObjectiveC ?
  • iDeveloperziDeveloperz Member Posts: 1,169
    yeh.
  • iDeveloperziDeveloperz Member Posts: 1,169
    It has to go along the lines of...

    something.textcolor = [UIColor WhiteColor];
  • ORBZORBZ Member Posts: 1,304
    what do the docs say?
  • iDeveloperziDeveloperz Member Posts: 1,169
    Haven't check i'll have a look now.
  • iDeveloperziDeveloperz Member Posts: 1,169
    No, nothing.
  • rebumprebump Member Posts: 1,058
    Have you tried my suggestion above? Most UI classes descend from UIView.
  • rebumprebump Member Posts: 1,058
    Okay, so UITableView supports "backgroundColor" from its inheriting from UIView. The UITableViewCells, used within a UITableView, support "textColor" and "selectedTextColor" as well as "backgroundColor" from them also inheriting from UIView.

    And remember, setting color properties to "nil" raises exceptions.
  • iDeveloperziDeveloperz Member Posts: 1,169
    Right this is my app so far...

    http://public.me.com/ideveloperz

    It is famoosh.png
Sign In or Register to comment.