The GIS Guy
  • Home
  • iOS
  • Web
  • GIS

CGFLOAT_MIN

A collection of 1 post

iOS

去掉 UITableView 顶部的多余空间

将 UITableView 的 style 设为 grouped 后发现顶部出现了大约有35px的额外空白。 原因是 group 样式的 UITableView 顶部会生成自带初始高度的 tableHeaderView。解决方案将 tableHeaderView 替换成一个高度为0的 UIView。首先尝试将高度设为 CGRectZero: // 这种写法有问题 UIView *tableViewHeaderView = [[UIView alloc] initWithFrame:CGRectZero]; self.tableView.tableHeaderView = tableViewHeaderView; 另外,如果 UITableView

Jon Jon
The GIS Guy © 2025
Latest Posts Ghost