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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:01:10+00:00 2026-06-02T01:01:10+00:00

My ViewController1 pushes ViewController2 ViewController2 *controller = [[ViewController2 alloc] init]; [self.navigationController pushViewController:controller animated:NO]; [controller

  • 0

My ViewController1 pushes ViewController2

ViewController2 *controller =
    [[ViewController2 alloc] init];
[self.navigationController pushViewController:controller
    animated:NO];
[controller release];

ViewController2 has UITableView … in xib file I connected delegate with File’s Owner. Also ViewController2 has Done button

- (IBAction)doneButtonPressed {
     [self.navigationController popViewControllerAnimated:NO];
 }

The problem is that if to click table rows and done button at the same time, sometimes didSelectRowAtIndexPath: method calls after that ViewController2 was popped, and I have SIGABRT error and this thing in logger :

[__NSCFSet tableView:didSelectRowAtIndexPath:]: unrecognized selector sent to instance 0x62579d0'

So how tableView:didSelectRowAtIndexPath can be called after I popped viewController2 ? It should be dead…

  • 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-02T01:01:11+00:00Added an answer on June 2, 2026 at 1:01 am

    One easy fix is to do this:

    - (IBAction)doneButtonPressed {
         self.tableView.delegate = nil;
         [self.navigationController popViewControllerAnimated:NO];
     }
    

    That way you guarantee that while you’re leaving that view no more delegate calls will happen. You could also do this in the dealloc method for the view controller (probably a better place for it).

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

Sidebar

Related Questions

I push new view controller like this. [self.navigationController pushViewController:resultViewController animated:YES]; but in the resultViewController,
here's my code: ViewController *vc = [[ViewController alloc] initWithNibName:@TableView bundle:nil]; [self.navigationController presentModalViewController:vc animated:YES]; //[self
I have a navigation view controller that pushes viewController1 properly. Then, from viewController1, goToApp
I have an app that has a UINavigationController that pushes a UITabBarController into view.
My application launches into a navigation controller. The root view controller has a button
I have a button that pushes another viewcontroller onto my navigationcontroller. When I press
I have a ViewController that has its own NIB. I would like to embed
Is there a general best-practices way of being notified when the current view controller
I have a navigation-based application with 2 UIViewControllers (controller-2 is pushed onto controller-1 when
I have a navigation controller based application and I'm running into a strange issue

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.