Getting width of a cell in a grouped UITableView for setting section header width

我的梦境 提交于 2019-12-08 22:14:28
  UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:section]];

CGRect rect = cell.frame;

NSLog(@"Cell width = %f",rect.size.width);
evfemist

The Width of grouped UITableViewCell depends on table width and calculates as

table.frame.size.width/16.0*14.0

These things are always subject to change, but the width of a UITableViewCell in a grouped UITableView is 300.0 points and has been since iPhone OS 1.0.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!