开发者

Whats the font and color of UITableViewCell text?

开发者 https://www.devze.com 2023-04-05 12:26 出处:网络
开发者_如何学CI want to replicate the UITableViewCellStyleValue1 provided by apple, I just can\'t figure out the font and size of the text in the cells in the right. Specifically the font and color of

开发者_如何学CI want to replicate the UITableViewCellStyleValue1 provided by apple, I just can't figure out the font and size of the text in the cells in the right. Specifically the font and color of numbers below is, 28 1 6843.

Whats the font and color of UITableViewCell text?


Use the default font with the label with the size = [UIFont boldSystemFontOfSize:16];

and the color of the number you are looking for is

label.textColor = [UIColor colorWithRed:81.0/255.0 green:102.0/255.0 blue:145.0/255.0 alpha:1.0];


The area on the right of a UITableViewCell is called the detailTextLabel. You can just create a UITableViewCell with the style you want and read the UIFont and UIColor values from it.

UITableViewCell* cell = [[[UITableViewCell alloc] initWithStyle: UITableViewCellStyleValue1 reuseIdentifier: @"Example"] autorelease];

UIFont* rightFont = cell.detailTextLabel.font;
UIColor* rightColor = cell.detailTextLabel.textColor;


ITableViewCellStyleValue1 A style for a cell with a label on the left side of the cell with left-aligned and black text; on the right side is a label that has smaller blue text and is right-aligned. The Settings application uses cells in this style.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号