【问题标题】:UITableView make the headerView not scrollableUITableView 使 headerView 不可滚动
【发布时间】:2012-03-14 00:26:03
【问题描述】:

如何使tableView“headerView”不可滚动。

【问题讨论】:

  • 把它放在 UITableView 之外(在顶部)。

标签: iphone uitableview nstableheaderview


【解决方案1】:

如果你只有一个部分,你可以根本不使用headerView并在UITableView之上添加一个UIView

【讨论】:

  • 我需要添加UISearchBar的问题,当我按照你说的,UISearchBar变得不活跃了!
  • 你想在 UISearchBar 和第一个单元格之间有一个不可滚动的视图吗?
  • 通过将其添加到 ViewController 的视图中解决(但首先要克服它没有填满屏幕宽度的问题,我先将其添加到 tableHeaderView )tableView.tableHeaderView = searchBar; [viewController.view addSubview:searchBar]
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-11-07
  • 1970-01-01
  • 2019-11-07
  • 1970-01-01
  • 2012-11-23
相关资源
最近更新 更多