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.
精彩评论