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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:49:22+00:00 2026-05-22T14:49:22+00:00

I have a Tab Bar Application, with an MKMapView on one tab’s-view (FirstView.xib &

  • 0

I have a Tab Bar Application, with an MKMapView on one tab’s-view (FirstView.xib & FirstViewController.h/.m), and a normal view with labels on it on the other tab’s-view (SecondView.xib).

I have an active CoreLocation running and updating in my FirstViewController. I need the CoreLocation Variables in on my SecondView as well. It has to display speed, altitude, lat/lon on the SecondView.xib.

How must I approach this? Should I have a ViewController for the SecondView as well? Maybe with another instance of CoreLocation? Or is it better to update the secondview’s labels from within FirstViewController? (I don’t know how to implement the second option – i.e. controlling two xib’s from one controller.)

Thanks in advance!

  • 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-22T14:49:22+00:00Added an answer on May 22, 2026 at 2:49 pm

    You should try putting the you CLLocation manager within your tab view controller. Then when it updates, it walks the tab views to see if they answer to a location update method you specify. That way it can handle 1, 2,…n views that need the location information.

    In your tab view controller:

    - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
    {
    
        for (UIViewController *thisTabView in tabBarController.viewControllers) {
            NSLog(@"thisTabView: %@", [thisTabView description]);
            if ([thisTabView respondsToSelector:@selector(locationManager:didUpdateToLocation:fromLocation:)]) {
                NSLog(@"thisTabView: calling locationManager:didUpdateToLocation:fromLocation:");
                [thisTabView locationManager:manager didUpdateToLocation:newLocation fromLocation:oldLocation];
            }
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a tab bar application, in one tab I have a view that
I have tab bar application and when i press on one of the tabs
I have a Tab bar application. and in one of the tab bars I
I have a tab bar application with a navigation controller and view controllers inside
I have a tab bar application and when I display a modal view controller,
I have a table view in an iPhone xcode tab bar application that shows
I have a tab bar application and in one of those tabs I have
I have a tab bar application with three tabs. In my second tab view
I have a tab bar application with a different view on each tab. Each
I have a Tab Bar Application and I want to simply display a view

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.