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

  • SEARCH
  • Home
  • 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 8884845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:09:44+00:00 2026-06-14T21:09:44+00:00

I have a UITableViewController that show data in cells. In viewWillAppear I add a

  • 0

I have a UITableViewController that show data in cells. In viewWillAppear I add a UIView to tableHeaderView with this method self.tableView.tableHeaderView =headerView;

In headerView I add a UISearchBar and a UISegmentControl programmatically. I set UISearchBar delegate like this

self.searchDisplay.delegate = self;
self.searchDisplay.searchBar.delegate = self;
self.searchDisplay.searchResultsDataSource = self;
self.searchDisplay.searchResultsTableView.delegate = self;

the searchDisplay is UISearchDisplayController.

The search is work perfectly but my problem is when I select one cell from searchResultsTableView and go to another viewController when touch back button in UINavigationController and come back to this view the table doesn’t scroll anymore.

I add this two method in viewDidLoad and viewWillAppear but still doesn’t work

self.tableView.bounces = YES;
self.tableView.scrollEnabled = YES;

It’s work perfectly when I select one row from table without search and go and come back.

What’s the problem ?

  • 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-06-14T21:09:45+00:00Added an answer on June 14, 2026 at 9:09 pm

    You are actually using two tableviews on the view, (self.tableView and self.searchDisplay.searchBarTableView) one for showing data, and one for showing the searched data. I think the searchViewController is staying on the screen after the segue.

    There’s a trick to show the whole data and search results in a single tableView (no need to use UISearchDisplayController)

    Just do the following to show the search results:

    self.tableView.dataSource = self;
    self.tableView.delegate = self;
    

    for the actual data, you can empty the UISearchBar and load the whole data in table view datasource.

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

Sidebar

Related Questions

I have a UITableViewController that displays cells that are just default. Each cell can
I have 8 cells that are being built in my UITableViewController. I would like
I have a UITableView that I want to edit inside of a UITableViewController. This
I have a subclass of UITableViewController. I have code that can add/remove a UISearchBar
I have this UITableViewController which i made a Static Cells using Interface Builder and
I have a UITableViewController that pushes a UIViewController using a UINavigationController: [self.navigationController pushViewController:detailViewController animated:YES];
I have an UITableViewController , set up so that users can delete rows. This
I have an iPad app that has a UITableViewController that implements the NSFetchedResultsControllerDelegate .
I have created a subclass of UITableViewController that is used as the custom class
I have made a XML parser that list correctly in the UITableViewController. It passes

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.