开发者

UITableView rows

I want to know how much is the table view row width and what is the font of a UITableVie开发者_C百科wCell text label, can someone please help me?


NSLog(@"width: %f", cell.frame.size.width);
NSLog(@"font: %@", cell.textLabel.font);

That logs the following with a "classic" tableview:

width: 320.000000

font: font-family: "Helvetica"; font-weight: bold; font-style: normal; font-size: 20px


CGFloat cellHeight = cell.frame.size.height;
UIFont *labelFont = cell.textLabel.font;

table view cells have the same width as their table view.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜