Search code examples
iossystemrgbtextcolor

How can I get the text color of a system UITableVIewCell's detail label?


I really like that feeling.

and there are also some other systems color which I cannot find their API in UIColor document,

such as the default text color of the button in the nib file, etc.

so is there any way I can use them?

I mean, they are just colors, no risk ,right?

Or is there any the RGBA value that looks alike them? thanks a lot!


Solution

  • UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cell"];
        [[cell detailTextLabel] textColor]
    

    textColor will just return the UIColor object of the cells detailTextLabel.