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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:36:01+00:00 2026-06-09T08:36:01+00:00

How can I do this? I have ViewController 1 , and ViewController 2 .

  • 0

How can I do this?

I have ViewController 1, and ViewController 2.

ViewController 1 defines a protocol and ViewController 2 conforms to it.

I set ViewController 2 has a delegate and invoke a method in ViewController 1. This method runs fine. And send confirmation back to my ViewController 2.

I can exchange data between them, but I’m trying to figure out a way, to get data from a particular instance of ViewController 1, to ViewController 2.

Because when I’m using my delegate, to run a method in ViewController 1 it’s not going for that particular instance that I’m interested in.

Is there a way I can resolve this?

Can I set my delegate, a delegate of a particular instance so I can get it’s state? Is this possible? And if so, how?

In other words, can I target a specific instance with my delegate?

—

p.s. if I try to get data of a property ruled by ViewController 1, it come has nil (I think this is because I’m not targeting a particular instance)! One way I can resolve it, is have a method that reads “already saved data”. But I would be replicating code, and instantiating new objects with data that is already available in previous ViewControllers.

Any help is most appreciated. Thank you in advance!

Nuno

edit:

SetupTableViewController *delegate = [[SetupTableViewController alloc] init];
[delegate setDelegate:self];

Every property I try to get from this point on forward, is nil. How can I target this to a particular instance of my previous ViewController? I do not want to instantiate a new SetupViewController. What I really need is to access an existing instance of my SetupViewController.

  • 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-09T08:36:04+00:00Added an answer on June 9, 2026 at 8:36 am

    The question is really vague and you should probably post some code to better explain what you’re trying to achieve.

    “I can exchange data between them, but I’m trying to figure out a
    way, to get data from a particular instance of ViewController 1, to
    ViewController 2.”

    Well when you do myViewController1Instance.delegate = self; , any delegate call that you make will only be sent from myViewController1Instance object to ViewController2, not from the other instances of ViewController1 class.

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

Sidebar

Related Questions

IF i have the following: MyString.ValueType = typeof(System.Decimal); how can i make this have
In Hotspot, when System.gc() is invoked, I can have this use the Concurrent-Mark-Sweep collector
I hope I can explain this right I have two input fields that require
I'm getting NaN. How can I do this and have it update every time
I have this problem that I can ref a button for control it. I
I have this query where I can search the TABLE_GLOBAL_PRODUCTS $catglobal_sql = select p.*,
I have this code so I can grab the values ind the dataset before
I have this simple example I can't seems to get working : MERGE INTO
I have this exact issue ASP.net can’t update page from event handler and it's
I have this JSON and you can see under products i have barcodes for

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.