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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:22:25+00:00 2026-06-05T10:22:25+00:00

Hello everyone — I am a beginner in iPhone programming and Core Data. I

  • 0

Hello everyone — I am a beginner in iPhone programming and Core Data. I am currently trying to learn some of the theory behind Core Data, and have been using this tutorial to help me implement it in my app.

The tutorial teaches by making the main view a UITableViewController that lists the saved objects and another UITableViewController that saves objects (where you enter in the attributes).

The app that I am creating has 3 views. The main view is a plain UIViewController (it handles calculations), you are able to save your calculations by tapping a UIBarButtonItem that brings you to the second view where you enter in more specific attributes. Once you tap save, you are taken BACK to the main view, where you are able to tap a Show Saved button to access the UITableViewController containing saved objects.

I have included #imported the UITableViewController files into my main view’s interface file, but when I run the program, I get an error on this line in my prepareForSegue method:

    addShoeSizeTVC.managedObjectContext = self.managedObjectContext;

The error is “Property managedObjectContext not found on object of type ‘SSFViewController*'” I understand the meaning of this error — I don’t have any object called managedObjectContext in my SSFViewController class, but I figured that if I included my file that DOES contain managedObjectContext that it would still be recognized. I should add, that in the tutorial, the prepareForSegue method was contained in the list view for the segue to the add new object UITableViewController. I moved this method to my mainViewController.

I also get an error in my App Delegate in my ApplicationDidFinishLaunchingWithOptions method:

    controller.managedObjectContext = self.managedObjectContext;

I understand that this stems from the same problem with the other error (it gives the same error message).

I do not understand how to pass data going from my viewA (mainView), to viewB (add object), back to viewA, then to viewC (view saved objects). I have heard about delegation and am using it in my prepareForSegue method in my SSFViewController main view:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {

    if ([segue.identifier isEqualToString:@"Add Object Segue"]) {

        NSLog(@"Setting ObjectsTVC as a delegate of AddObjectTVC");
        AddObjectTVC *addObjectTVC = segue.destinationViewController;
        addObjectTVC.delegate = addObjectTVC.self;
        addObjectTVC.managedObjectContext = addObjectTVC.self.managedObjectContext;
    }
}

Also on the addObjectTVC.delegate = addObjectTVC.self; line I get a warning that says “Passing ‘AddObjectTVC*’ to parameter of incompatible type ‘id'”

Do I have to set up an NSManagedContext or another delegation method in my main view? Or is it something that I must add to any of my Table views???

Thank you very much. I feel like this is a simple problem to solve, if provided with the right information. I am happy to post any other methods that I used if needed to solve the problem. I am a beginner, so it would be great if you could explain in a beginner-friendly way.

Thanks!

  • 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-05T10:22:27+00:00Added an answer on June 5, 2026 at 10:22 am

    First of all, if you want data from ViewA to ViewB, insert a property in the ViewB and you can pass data from ViewA to this @property

    Example

    ViewB:

    @property (nonatomic, strong) NSString *yourName;
    (don’t forget to call @synthesize yourName )

    ViewA: (in prepareForSegue method)

    “ViewB-Controller” *controller = segue.destinationViewController;
    controller.yourName = self.name

    –> name will be passed to ViewB

    Second:
    I prefer a delegate which send from ViewB to ViewA “Hey please save your data”. It keeps your controller easy and smart, and you don’t have to manage the save method from all view controllers. Delegate is an important chapter in iOS and it can be very frustrated for a beginner. (I was in the same situation 9 months before ;))
    Search for a delegate example and try to understand how it works (learning by doing), if you have further question about delegate, I will friendly respond to your question.

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

Sidebar

Related Questions

Hello everyone, I have been banging my head really hard trying to solve this
Hello everyone it's been some days that I use sql to make analysis and
Hello everyone I have a question... I'm trying to make my sms faker app,
Hello everyone i have a problem I have a text $text = some and
Hello everyone i currently have this: import feedparser d = feedparser.parse('http://store.steampowered.com/feeds/news.xml') for i in
Hello everyone I am just learning my first programming language and have just corrected
Hello everyone! I have a website which is http://www.urbanelementz.ca ... It's currently in development.
Hello everyone i need some help. I'm trying to make an application for mac
Hello everyone I am beginner in Android Programming, and fresh developer too, In my
Some details XAMPP 1.7.1 OS tested on vista and xp Hello everyone. I have

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.