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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:15:20+00:00 2026-05-27T17:15:20+00:00

I have a Searchbar that generally works. The problem comes when I test on

  • 0

I have a Searchbar that generally works. The problem comes when I test on the iPhone, the autocorrect kicks in. I have the search bar set that if there is text in the query bar > 4 in length,then it starts putting things into the searchResults array. If there is a suggestion from autocorrect and I ignore it and select something from the array, the app crashes. I traced the error to the fact that the autocorrected word is being selected before the row selection (but both get done), so the searchResults array I thought I was accessing is no longer valid.

For instance, I put in “demp” into the search bar. Autocorrect suggests “demo”. Meanwhile, the search returns a bunch of results with “dempster” in it. I select the first. As I do this, the search re-searches under “demo” and clears the original array (keep in mind I look to a server for the searches so the array has not re-filled). Then the didSelectRowAtIndexRow method triggers and there’s nothing in the array and it crashes.

Any thoughts? Thanks in Advance.

  • 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-27T17:15:21+00:00Added an answer on May 27, 2026 at 5:15 pm

    Since you are using a search bar there should be no autocorrection, people want to find what they’re looking for, not what some dictionary tells them to find. Simply set

    searchBar.autocorrectionType = UITextAutocorrectionTypeNo;
    

    and problem will be solved.

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

Sidebar

Related Questions

I Have a search bar that searches an array, and updates a UITableView with
I have a table view along with search bar. I want to ensure that
I have a problem: I am programming an app that is using a searchBar
I have the following method for my search bar, that searches for the key
I have designed an application for iphone/ipad. My problem is that I am using
alt text http://img216.imageshack.us/img216/2288/problem11.png As given in the picture, I have an search bar in
I have a search page that contains a textbox for the search and a
I am implementing mobile local search in iPhone application: - (void)searchBar:(UISearchBar *)theSearchBar textDidChange:(NSString *)searchText
I have a TabBar, NavBar, SearchBar with ScopeBar on my screen. I can search
I get this error when i play with the searchbar that I have just

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.