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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:47:33+00:00 2026-06-03T05:47:33+00:00

Mapkit usage, here is my scenario: When the user chooses one of the pushpins

  • 0

Mapkit usage, here is my scenario: When the user chooses one of the pushpins on my map, then selects the callout associated with that pin, the user is to be be brought to another ViewController that will show information pertinent to their selection.

To set data for the destinationViewController, I am using

   prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender

This is working but I have an issue where I am not sure which annotation has been selected.
The following code illustrates my issue – the code works, but I have it hard coded to “objectAtIndex:0″ instead of objectAtIndex:”whatever pin they selected”

    [self.myImageViewController setAddressMessage:  [[self.annotations objectAtIndex:0] houseAddress]];        

In prepareForSegue, how do I know which pin they have selected?

  • 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-03T05:47:34+00:00Added an answer on June 3, 2026 at 5:47 am

    Not knowing the rest of your code, I’m not sure if this will work but this is how I found the annotation in a similar situation where a button on the annotation view’s callout was pressed.

    -(void)buttonInCalloutWasTapped:(UIButton *)button {
        if ([[[[button superview] superview] class] isSubclassOfClass:[MKAnnotationView class]]) {
            MKAnnotation *annotation = [(MKPinAnnotationView *)[[button superview] superview] annotation];
            [self.myImageViewController setAddressMessage:  [annotation houseAddress]];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We want to use MapKit / MKOverlayView to create a map that looks totally
I'd like to center a map (mapkit) against the user's location. I do the
I found some mapkit code on the internet that looks like this: - (void)recenterMap
Im using MapKit in my application and disaply the user location with [mapview setShowUserLocation:YES];
I'm using MapKit to display the user's location relative to pins around them. I'd
When using the MapKit library and placing a pin/MKAnnotation, you will implement the MKAnnotation
I am attempting to use MapKit to create a custom map (similar to this
I'm trying to simulate the user location animation in MapKit (where-by the user's position
I understand that the mapkit is used to show a device location in the
I am using MapKit. I want to know how to get current user's location.

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.