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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:18:59+00:00 2026-05-13T11:18:59+00:00

From the view A I open the View B which contains categories in a

  • 0

From the view A I open the View B which contains categories in a uitableview, when I select a category I open the view C which contains subcategories for the category (using the CoreData persistence ) in a uitableview, when I select a subcategory I open the view D which contains all my product (using the CoreData persistence ), when I select the the product, how can I set the value into the view A? Avoiding leaks of course…

A(MainWindow)->B(UITableView with category)->C(UITableView with subcategory)->D(UITableView with products)
D->C(with the selected product)->B(with the selected product)->A(with the selected product)

I hope I’m enough understable 😀

Thank you

  • 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-13T11:18:59+00:00Added an answer on May 13, 2026 at 11:18 am

    This approach assumes you are using an UINavigationController with a stack of UIViewController instances, each of which having a managed object context instance as a part of a Core Data application.

    Set up an ivar and a @property in your application delegate header that holds a value for the selected product (an NSManagedObjectID*, for example):

    NSManagedObjectID *selectedProduct;
    ...
    @property (nonatomic, retain) NSManagedObjectID *selectedProduct;
    

    Synthesize this ivar in the implementation, and release it in -dealloc:

    @synthesize selectedProduct;
    ...
    - (void) dealloc {
        [selectedProduct release], selectedProduct = nil;
        ...
    }
    

    Set up the following macro wherever you keep your constants, or in each view controller header:

    #define UIAppDelegate ((MyAppDelegate *)[UIApplication sharedApplication].delegate)
    

    From any view controller, thereafter, you will be able to set and access your selectedProduct value, e.g.:

    NSManagedObject *foo;
    
    // set the property
    [UIAppDelegate setSelectedProduct:[foo objectID]]; 
    
    // access the property
    foo = [self.managedObjectContext objectWithID:[UIAppDelegate selectedProduct]]; 
    

    You don’t necessarily have to use an NSManagedObjectID* here. You can use any class you like.

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

Sidebar

Related Questions

Which method would you recommend to pass data from a child view back to
I am using ASP.NET 4.0 Framework.I have a directory which contains 10 PDF files
When submitting one form from view, how can i also read or have controller
Short: how does modelbinding pass objects from view to controller? Long: First, based on
I need to find a way to hide HTML Rows (or Tables) from view
How should I initiate a delete action from my view? Creating a new form-tag
Is it possible to redirect to a different view from a controller? For example,
I'm working on a control to tie together the view from one ListView to
I am hoping to dynamically update a ModelForm's inline Meta class from my view.
Simply put, MVC is the pattern for separating contents (model) from presentation (view), and

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.