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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:22:56+00:00 2026-05-13T22:22:56+00:00

In CoreData, I have the data graph with some entities, and each object is

  • 0

In CoreData, I have the data graph with some entities, and each object is populated in a view controller, at a defined screen, I want to pop out some (>1) objects to return to a define screen.

I tried to pop the view controllers out of the navigation stack with these lines of code:

ObjectA *objectA = objectD.objectC.objectA;
NSLog(@"objectA name: %@", objectA.name);
MyViewController    *controller = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil withObjectA:objectA];
[self.navigationController popToViewController:controller animated:YES];
[controller release];

The objectA, objectB, objectC, objectD are all objects from my data graph(with the inverse relationship, I can query back the objectA from the objectD through objectC)

The following error message is raised:

Assertion failure in -[UINavigationController popToViewController:transition:], /SourceCache/UIKit_Sim/UIKit-984.38/UINavigationController.m:1807

There are two questions here:

  • If the two objects are different, how comes they have the same name? the inverse relationship can not get back the objectA in which I used to initialize MyViewController?
  • How do you normally do popToViewController? How can I implement save/load the current state of my navigation controller so that when the application quits, I can reload the navigation controller? What are the best practices?
  • 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-13T22:22:56+00:00Added an answer on May 13, 2026 at 10:22 pm

    This has nothing to do with Core Data. You are creating a new view controller when you should just reference your existing MyViewController instance. The newly created controller is obviously not on the navigation controller’s stack and so you get an exception when you try to switch to it.

    Use the self.navigationController.viewControllers array to reference the controller that’s already on the nav controller’s stack.

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

Sidebar

Related Questions

i have some Data in a TableView (loaded from coreData) and now i want
In my Core Data managed object model, I have an entity Foo with a
I have a data model with three entities (Purchase, Items, Image) the purchase is
i have an application which uses CoreData/.sqlite to store my data, a tab bar
I have an iPhone app that is using CoreData. I recently made some minor
I'm wanting to make a CoreData entity called Employees, some Employees could have a
I have a relationship in a Core Data model that feels like it wants
I'm working with CoreData in Cocoa (not document-based). My problem is, that I want
Imagine an CoreData entity (e.g. named searchEngine ). NSManagedObjectContext manages some instances of this
I have setup Core Data for an iPhone app without an instance of NSFetchedResultsController.

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.