2011-02-04 47 views

回答

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

即记录以下用 “经典” 的tableview:

宽度:320.000000

字体:字体家庭: “黑体”; font-weight:bold; font-style:normal; font-size:20px

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

表视图单元格与其表格视图具有相同的宽度。

+1

这个问题没有询问细胞高度 – Felix 2011-02-04 14:57:15