1

How to make the tableView "headerView" not scrollable.

Muhammad Hewedy
  • 29,102
  • 44
  • 127
  • 219

1 Answers1

1

If you only have one section, you can simply not use headerView at all and add a UIView above the UITableView

JiaYow
  • 5,207
  • 3
  • 32
  • 36
  • The problem that I need to add UISearchBar, and when I follow what you are saying, the UISearchBar became inactive! – Muhammad Hewedy Feb 23 '12 at 15:29
  • you want a not-scrollable view between the UISearchBar and the first cell? – JiaYow Feb 23 '12 at 15:35
  • Solved by adding it to the ViewController's view (but first to overcome on the issue that it don't full fill the screen width, I added it first to the tableHeaderView ) `tableView.tableHeaderView = searchBar; [viewController.view addSubview:searchBar]` – Muhammad Hewedy Feb 23 '12 at 16:21