Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6151585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:47:22+00:00 2026-05-23T19:47:22+00:00

I have a UITableViewController , in which I added a UISearchBar as the tableHeaderView

  • 0

I have a UITableViewController, in which I added a UISearchBar as the tableHeaderView using Interface Builder. Then I added a UISearchDisplayController in the nib, and set up all the connections (delegate, searchResultsDelegate, searchContentsController, searchResultsDataSource, all connected to the UITableViewController).
I then implemented all the delegate and data source methods in my code.

It works like a charm, except for a weird bug: sometimes the search results table view won’t scroll, and I can see the flash indicator of the main table view behind it. I NSLog’d the searchResultsTableView and apparently it’s a subview of the main tableview, and I guess that’s the reason behind the touch problems I described earlier.

What’s my mistake? Is it possible to use a UITableViewController with UISearchDisplayController at all? If so, how do I set up it in such a way that the results table view doesn’t get added as a subview of my main table view?

Update: I found this sample which uses UISearchDisplayController with UITableViewController and apparently the search table view gets added to the main table view in there as well. So now I don’t think that’s my problem.

The thing is that I can’t find any substantial difference between what I’m doing and what that sample is doing. I’m just adding an UISearchBar as a UITableView header in a UITableViewController and adding a UISearchDisplayController to it… It’s like iOS is confused between the main table and the search table when I try to scroll. Do you have any ideas?

Update: Added a 200 rep bounty. Please answer only if you know what you’re talking about.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:47:25+00:00Added an answer on May 23, 2026 at 7:47 pm

    It was an extra self.tableView.scrollEnabled = YES which was called as soon as the search data request was finished. Hope it helps anyone with the same problem in the future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this UITableViewController which i made a Static Cells using Interface Builder and
I am using a UITableViewController which uploads a table. I have a Nib File
I am using iPhone SDK 3.1.3. I have a UITableViewController which gets data from
I have a UITableViewController in my app, which is added to the view hierarchy
I have a typical UITableViewController set of views. On all views is a button,
I have a CoreData app with the MainView the UITableViewController which houses all of
I have an UITableViewController which I would like to add UIToolbar to with one
I have a UIPickerView as subview in a UITableViewController, which I want to slide
I have a UITableViewController. In viewDidLoad I set the rowHeight: self.tableView.rowHeight = 43; But
I have a subclass of UITableViewController. I have code that can add/remove a UISearchBar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.