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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:57:49+00:00 2026-05-26T08:57:49+00:00

I have a problem: I am programming an app that is using a searchBar

  • 0

I have a problem: I am programming an app that is using a searchBar and a tableView.

When I click the search bar, type some string to search for, as soon as I hit the cancel button, or delete all the search terms and click the tableView again my app crashes.

When I run the app in the iOS Simulator, it doesn’t crash when doing this.

When I run the app on my iPhone via xcode, it doesn’t crash when doing this.

I don’t really understand the device log and I wanted to ask if there is any way to find out what’s going terribly wrong and why this is not happening when doing it via xcode. Please help me!

PS: One of the device logs: (Maybe you guys understand this)

something went wrong

EDIT: Here’s the code of the searchDisplayControllerDidEndSearch method:

- (void)searchDisplayControllerDidEndSearch:(UISearchDisplayController *)controller 
{    
    [self.navigationController setNavigationBarHidden:NO animated:YES];
    [UIView beginAnimations:@"DeactivateSearch" context:nil];
    [UIView setAnimationDuration:0.4];
    [self.attractionsTableView setFrame:CGRectMake(0, 43, 320, 362)];
    [UIView commitAnimations];


    NSFetchRequest *fetchRequest = [[self fetchedResultsController] fetchRequest];

    [fetchRequest setPredicate:nil];

    NSError *error = nil;
    if (![[self fetchedResultsController] performFetch:&error]) {
        // Handle error
        NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
        abort();
    }  

    [self setSearchIsActive:NO];

    return;
}

UPDATE: The search bar does NOT crash if no text was typed. So simply activating the searchBar and deactivating it without typing works. But as soon as I have typed a single character the deactivating process crashes the app.

  • 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-26T08:57:50+00:00Added an answer on May 26, 2026 at 8:57 am

    I found the answer myself..

    In one of my custom cells I released something too often and thus the app crashed when the UISearchDisplayController was releasing the UITableView for the search results.

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

Sidebar

Related Questions

I have problem in some JavaScript that I am writing where the Switch statement
I am programming an app, that automatically answers a call. The problem is, that
I'm currently programming an app for iphone that uses the tab bar. One of
I'm currently programming an app that deals with line graphs. I have three dots
I've got a philosophical programming problem. Let's say I have a class named Employees.
I have recently started programming in WPF and bumped into the following problem. I
I have just started with Gui Programming in netbeans (Using the template Java Desktop
I'm programming a GUI in my app and I noticed that button presses weren't
I am a complete Android programming newbie. I have completed some tutorial examples like
Heres my problem, I'm web developer and I have a web based script(PHP/CURL/HTML/JS) 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.