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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:52:52+00:00 2026-05-23T13:52:52+00:00

I have a detail view that is pushed from a map. I am trying

  • 0

I have a detail view that is pushed from a map. I am trying to get the title and subtitle from the annotation to show in the detail view. I can get the title to show in the Navigation bar, but I cannot get them to show up as UILabels. I have UILabels in my interface builder for the MapDetailInfo all connected to the “name” and “address”, but they will not fill when the view is pushed. Here is my code:

In My Map View Controller

- (void)mapView:(MKMapView *)mapView 
 annotationView:(MKAnnotationView *)view 
calloutAccessoryControlTapped:(UIControl *)control
{
   MapDetailInfo *abc = [[MapDetailInfo alloc]init];

   abc.title = view.annotation.title;


    [self.navigationController pushViewController:abc animated:YES];



nameText.text = view.annotation.title;
addressText.text = view.annotation.subtitle;

}

In My Detail View Controller:

- (void)viewDidLoad
{
[super viewDidLoad];

BusinessListingsPart3ViewController *blv = [[BusinessListingsPart3ViewController alloc] init];

name.text = blv.nameText.text;
address.text = blv.addressText.text;

}

Any help would be much appreciated. 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-05-23T13:52:53+00:00Added an answer on May 23, 2026 at 1:52 pm

    Both name and address are not instantiated at this time. Their values will be nil.

    Declare nameText and addressText as properties, set them in this method and then later update the labels in the viewDidLoad method.


    MapDetailInfo.h

    @interface MapDetailInfo: .... {
        NSString * nameText;
        NSString * addressText;
    
        ....
    }
    
    @property (nonatomic, copy) NSString * nameText;
    @property (nonatomic, copy) NSString * addressText;
    
    ....
    

    MapDetailInfo.m

    @implementation MapDetailInfo
    
    @synthesize nameText;
    @synthesize addressText;
    
    ....
    

    In the current method mapView:annotationView:calloutAccessoryTapped:, replace

    abc.name.text= view.annotation.title;
    abc.address.text = view.annotation.subtitle;
    

    with

    abc.nameText = view.annotation.title;
    abc.addressText = view.annotation.subtitle;
    

    And in MapDetailInfo‘s viewDidLoad method, add

    self.name.text = nameText;
    self.address.text = addressText;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On a detail view I'm trying to pull the navigation item's title which is
I have a table view that pushes to a detail view controller. From the
I have a detail view that includes three UIButtons, each of which pushes a
Help!! I have a listadapter with a detail view, the problem that I am
I have a UITabBar in the detail view of my navigation based application. I
I have a detail view that includes three UIButtons, each of which pushes a
I have a problem where I can successfully push a new view controller from
I have one detail view controller in splitView - SearchDeatilViewController. But that view controller
In a MVVM WPF application, I have a master-detail View that is used to
I have built a RSS reader that switches to a detail view when a

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.