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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:46:32+00:00 2026-06-07T15:46:32+00:00

Ok, I know that the model for the new graphing vc is going to

  • 0

Ok, I know that the model for the new graphing vc is going to be a subclass of the calculator brain, but how do I get the program stack of the CalculatorBrain from the old VC to the GraphingBrain of my new VC? DO I have to go down the stack on the Storyboard-segue?

I have the pinching and panning on the new axes setup, as well as the delegate to communicate between the new graph brain and graph vc. But isn’t my programStack that the user typed in before “trapped” in the old MVC?

I think I’ve got the concept down, but I don’t see the way for that communication to occur.

Thanks in advance!

***For those who don’t follow the course, I have two MVCs linked by the NavigationController. The user enters a series of numbers and operations (in the first MVC) which are stored in are then stored in an array in the model of the first MVC. When a button is pressed, it segues to a new MVC, which needs the array that was entered in the previous MVC. How do I transfer that array between two seemingly separate MVCs? I don’t think I can have a property in the second VC and set it from the first VC because it(the second MVC) is not instantiated yet. It maybe something with preparteToSegue but I’m not sure.

  • 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-07T15:46:36+00:00Added an answer on June 7, 2026 at 3:46 pm

    Having gone through CS193P (well more than half way there), I think I understand your questions. Here is what you need to remember:

    To send a property value down the MVC (C –> V) path and in this case the V holds another MVC; use PrepareForSegue. Regardless of whether the destination has been instantiated or not, you need to do a few things:

    1. Import, in the .h or .m file header of the 1st class, the 2nd class.
    2. In the prepareForSegue, create an instance of the 2nd class and set it to be equal to segue.destinationViewController. You will need to typecast the latter to the second class.
    3. Now you can set the property of this instance you created (of the 2nd class) to any value you want.
    4. You cannot set any IBoutlet values for the second class, from the prepareForSegue, because IBOutlets are not setup until after ViewDidLoad.
    5. For some odd reason, if you do use a condition to check for the segue.identifier, you will need to enclose the statements in {} even if it is only one statement.

    Hope this helps and gets the juice flowing…

    KMB

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

Sidebar

Related Questions

I have an UIViewController subclass that allows the user to add a new model
I know that model should not be aware of session data but I have
I know that component-model indicates whether a property has a default value or not,
In the parent delegation model for loading classes, I know that loadclass() is invoked
I know that g.setXORMode(Color c) enables XOR mode drawing. But how to disable this
I know that Phonegap has an event for back button, but it's only available
I know that this sort of question has been asked here before, but still
I know that Java have its own garbage collection, but sometimes I want to
i'm relatively new to XML Schemas and i've encountered a problem. I know that
I know that something similar to this has been answered before but its not

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.