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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:49:38+00:00 2026-06-04T09:49:38+00:00

I display a UITableView with a search bar and scope bar buttons on load.

  • 0

I display a UITableView with a search bar and scope bar buttons on load. When a user taps a scope bar button, the keyboard is displayed and the search bar gets focus (becomes first responder).

Is it possible to allow the use of the scope bar buttons to filter the table items without having the keyboard appear? The user could get the keyboard to appear by specifically tapping within the search text entry field.

  • 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-04T09:49:39+00:00Added an answer on June 4, 2026 at 9:49 am

    My solution in the end involved the use of two delegate methods and a state variable on the view controller.

    On the view controller i added the property

    NSNumber *scopeButtonPressedIndexNumber; 
    
    - (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar {  
    
      if (self.scopeButtonPressedIndexNumber != nil) {
        self.scopeButtonPressedIndexNumber = nil; //reset
        return NO;
      }
      else {
        return YES;  
      }
    
    } 
    
    - (void)searchBar:(UISearchBar *)searchBar selectedScopeButtonIndexDidChange:(NSInteger)selectedScope {
      self.scopeButtonPressedIndexNumber = [NSNumber numberWithInt:selectedScope];
    } 
    

    In essence, I capture if the scope button is pressed, and I return NO in shouldBeginEditing if that is the case. In this way, I was able to prevent focus from going to the search bar.

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

Sidebar

Related Questions

I have implemented a UITableView with search bar (and search display) - all works
I have a search bar added to the navigation bar. When the user types
In the tableview the user can tap the upper right button (navigation bar rightside)
I need to display search button at the edge of last visible cell in
I have a need to display a UITableView containing a user's account credentials. For
I am using a UITableView to display a list of cells, when the user
I am using a static grouped UITableView to display some settings to the user.
Is it possible to create and display a UITableView controller which allows the user
I am using a UITableView to display some data which the user can filter.
I want to display a UITableView with Multiple Columns. The first column will have

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.