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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:47:29+00:00 2026-06-10T09:47:29+00:00

In my application I have three view controllers of concern. The first contains a

  • 0

In my application I have three view controllers of concern. The first contains a map and a button to open the second view controller. The second view controller contains a searchable table and then when the user selects a row it loads the relevant data in the third view controller. This all works well!

Now the intention is that when the user presses the Show on Map button in the third view controller it’ll pass back the data (in this case two double values for the coordinates) to the first view controller so that the first view controller can then focus in on these coordinates.

I’ve followed Apple’s documentation (the BirdSighting tutorial) as well as previous questions/answers on SO but I’ve noticed one issue.

I can’t really find a place to set the thirdviewcontroller’s delegate to be the first view controller. Typically I’d enter the following code in the first VC but I’m not creating an instance of the third VC – that happens in the second one:

thirdVC.delegate = self;  //set self as the delegate

So what should I do?

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-10T09:47:31+00:00Added an answer on June 10, 2026 at 9:47 am

    Delegate is one of many mechanisms to accomplish what you need. The suggestion by @onnoweb is perfectly suitable, though this can get messy passing around delegate pointers.

    KVO:
    You can also consider KVO, putting your data into a model object, having VC3 update the model object, and VC1 an observer of those values.

    NSNotificationCenter:
    Another alternative is NSNotificationCenter

    in VC3, use this to send a broadcast (set your dictionary to contain your latitude/longitude coordinates):

    [[NSNotificationCenter defaultCenter] postNotificationName:@"ShowOnMap" object:[NSDictionary dictionaryWithObjects:objects forKey:keys]];
    

    in VC1:

    register to receive the broadcasts:

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onShowOnMap:) name:@"ShowOnMap" object:nil];
    

    and handle the broadcasts:

    -(void) onShowOnMap:(NSNotification *)notification
    {
     NSDictionary *values = [notification object];
     .
     .
     . 
    }
    

    and unregister in your dealloc

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

Sidebar

Related Questions

In my application I have a uitabbar contoller for managing the three view controllers.
I have three view controllers, one root controller, one login view controller and one
In my application i have 6 different view controllers. 1. Home page 2. A
I have two view controllers: MyParentViewController and MyChildViewController . The application starts with MyParent
hi I created a view based application and I have three classes: -MyAppViewController; -Item
I have a UITabBar application, which has three tabs. The first tab has a
I have a tab bar controller with different view controllers all using the same
I have a three view tab bar app the second view of which I
I have an application which has 7 tabs with associated views and view controllers.
I have an application where there are a few view controllers on top of

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.