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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:25:44+00:00 2026-05-23T18:25:44+00:00

I have two controller classes A and B. A instantiates several of B. When

  • 0

I have two controller classes A and B. A instantiates several of B. When the appropriate button is pressed in A, A instantiates a B and program flow is passed to B. At the end of B’s run I want it to pass some data back to A. How is this possible?

To be more precise, I have an NSArray of Objects, which I would like to return to ‘A’ after B runs its last method…

  • 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-23T18:25:44+00:00Added an answer on May 23, 2026 at 6:25 pm

    Lots of options:

    1. Keep your data in a singleton DataManager object that both VCs can reference
    2. Have B post an NSNotification that it is done, and have A be an observer for that notification, pass the data of interest in the notification.
    3. Give B a reference to an iVar in A so it can directly set the values
    4. Give B a reference to a method in A (possibly by declaring a protocol) so it can call that method and pass the data base that way.

    Probably more, but these are the ones I use most often.

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

Sidebar

Related Questions

I have two view controller classes in my application delegate. I can change from
I have a two classes, a controller called AppController and a class called URLDelegate
I have two classes. UserModel and UserController. file: localhost/controllers/user.controller.php <?php class UserController { public
I have a model called Details, and two controller methods new and create. New
Can somebody explain me one thing. I have two methods in my controller :
I have a Controller with two Edit methods (see below). When I submit the
I have a NIB with two NSWindow objects. The controller class has two IBOutlets,
I have two classes : User, Patent and Help (belongs_to :user and belongs_to :patent)
I have two test classes called TT_Common and TT_Container which extends CPPUNIT_NS::TestFixture: class TT_Common
I have two model classes: Cars and Customers , Model Cars : class car

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.