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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:15:25+00:00 2026-06-14T11:15:25+00:00

I have a tabBarView controller and a TableViewController. When I click on a row

  • 0

I have a tabBarView controller and a TableViewController. When I click on a row I wan to go to another Tab which is UIViewController with Map:

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    if(storeName) 
       [self setMap];
}

- (void) setMap {

    NSLog(@"Name:%@\n", storeName);
    NSLog(@"Adress:%@\n", storeAddress);



        self.indexMapView.delegate = self;

        self.indexMapView.showsUserLocation = NO;

        self.locationManager = [[CLLocationManager alloc] init];
        [locationManager setDelegate:self];

        [locationManager setDistanceFilter:kCLDistanceFilterNone];
        [locationManager setDesiredAccuracy:kCLLocationAccuracyBest];

        [self.indexMapView setShowsUserLocation:YES];

        CLLocationCoordinate2D location = [self getLocationFromAddressString:self.storeAddress];

        NSLog(@"%g", location.latitude);

        MapViewAnnotation *mapAnnotation = [[MapViewAnnotation alloc] initWithTitle:@"Store location" coordinate:location];
        [self.indexMapView addAnnotation:mapAnnotation];

}

-(CLLocationCoordinate2D) getLocationFromAddressString:(NSString*) addressStr {

    NSLog(@"FFF");

    NSString *urlStr = [NSString stringWithFormat:@"http://maps.google.com/maps/geo?q=%@&output=csv",
                        [addressStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];

    NSError *error = nil;

    NSString *locationStr = [NSString stringWithContentsOfURL:[NSURL URLWithString:urlStr] encoding:NSUTF8StringEncoding error:&error];

    NSArray *items = [locationStr componentsSeparatedByString:@","];

    double lat = 0.0;
    double lon = 0.0;

    if([items count] >= 4 && [[items objectAtIndex:0] isEqualToString:@"200"]) {
        lat = [[items objectAtIndex:2] doubleValue];
        lon = [[items objectAtIndex:3] doubleValue];
    }
    else {
        NSLog(@"Address, %@ not found: Error %@",addressStr, [items objectAtIndex:0]);
    }

    CLLocationCoordinate2D location;
    location.latitude = lat;
    location.longitude = lon;

    return location;
}

This is how I go to the MapViewController:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    MapViewController *mapViewController = [[MapViewController alloc]init];

    [mapViewController setStoreAddress:store.address];
    [mapViewController setStoreName:store.name];
    [mapViewController viewDidLoad];

    [self.tabBarController setSelectedIndex:4];
}

The problem is Map does not get update when I go to the page again. When I tried it with PushSegue, it works. but how can I make it work with TabBar?

  • 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-14T11:15:29+00:00Added an answer on June 14, 2026 at 11:15 am

    I figured out how can I pass the data over tab bars. You can find more descriptions in these links:

    iPhone: How to Pass Data Between Several Viewcontrollers in a Tabbar App

    Passing a managedObjectContext through to a UITabBarController's views

    Also this tutorial is useful.

    • 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 controller that I have created programmatically, named TPastJourneyTabbar .
I have a tab bar controller with two tabs: tabBar1View with a button named
my home page is a tabbarView,now ,I have a presentModalView Controller,and as we know
I have a tabbar iPhone application in which tabbar is the root controller and
i have this animation on the first view controller of a tabbarviewcontroller - (void)viewDidAppear:(BOOL)animated
I have a TabbedView Activity with 3 tabs. Currently, only the 1st tab has
have written this little class, which generates a UUID every time an object of
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
Have deployed numerous report parts which reference the same view however one of them
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:

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.