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 5935407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:15:00+00:00 2026-05-22T15:15:00+00:00

I have a searchDisplayController that searches a UITableView . After entering the search terms,

  • 0

I have a searchDisplayController that searches a UITableView.

After entering the search terms, I can see another UITableView that contains the search results. However, I want this UITableView to be GROUPED, not PLAIN (like it is by default).

How do I do this?

  • 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-22T15:15:00+00:00Added an answer on May 22, 2026 at 3:15 pm

    If – like me – you think the plain TableView was way too ugly, you can also abandon the use of SearchDisplayController.

    I just:

    • inserted in an empty View a searchBar and a TableView as we usually do for IBOutlet
    • selected the File’s owner as delegate for both of them.
    • At the beginin the number of section is 0 ([myTab count]) then I used reloadData and this time myTab is populated by the result.
    • [self.resultTableView reloadData];

    Here you can find all the method I used from the delegates

    @interface MyViewController : UIViewController <UIApplicationDelegate, UISearchBarDelegate> {
    
        IBOutlet UISearchBar *searchBar;
        IBOutlet UITableView *resultTableView;
    }
    
    @property (nonatomic, retain) IBOutlet UISearchBar *searchBar;
    @property (nonatomic, retain) IBOutlet UITableView *resultTableView;
    
      //For your searchBar the 2 most important methods are
    - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBarClicked;
    - (BOOL)searchBarTextDidEndEditing;
    
    
      //For your TableView the most important methods are in my case:
    
        //number of sections in the table view.
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView;
        //HEADERS
    - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section;
        //different numbers of row by section
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;
        //the cells themselves
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
    
    @end
    

    After all, the simplest solution is often the best…

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

Sidebar

Related Questions

Have a n-tire web application and search often times out after 30 secs. How
I have a TabBar, NavBar, SearchBar with ScopeBar on my screen. I can search
I have some code, but I can't see how I can optimize it. Allthough
Have an app that can use tts to read text messages. It can also
Have created an attribute property in TableView1.h and pushing that attributes value to another
I have a UITableViewController subclass that renders a list of pre-set categories and fetches
I have seen Apple's example TableSearch that when touched its scope buttons come below
I have an app very similar to address book of iphone. The entire search
Have noticed issue while testing iphone app that if one quickly opens/dismisses a modal
I have a project that adds elements to an AutoCad drawing. I noticed that

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.