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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:27:42+00:00 2026-06-04T23:27:42+00:00

i have a map and the map have annotation , and i can see

  • 0

i have a map and the map have annotation , and i can see these annotation in table view as a cells then i can see the details for any cell i selected like the master details project in the xcode

like this

    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"showDetail"]) {
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
Object *object = [self.objects objectAtIndex:indexPath.row];
DetailsViewController *detailsViewController = segue.destinationViewController;
detailsViewController.detailItem = object;
}

the code was for the cell in the table view that will push to the details view

but i want the user when he press UIButtonTypeDetailDisclosure in the annotation then the Button will go to the same DetailsViewController that the cell will go to in the table view

is it possible to do this ?

i have read about calloutAccessoryControlTapped but i’m not sure how to make the annotation that have been selected to be the detailItem that i have declared in the DetailsViewController

Thank you : )

  • 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-04T23:27:43+00:00Added an answer on June 4, 2026 at 11:27 pm

    It’s a little unclear what you’re asking. Here’s a couple of guesses and their answers:

    How do I perform a segue from a map callout accessory button?

    Dragging from controls (table cells, buttons, etc) in IB is a nice way to make segues since UIKit can handle everything for you — when the control is tapped, it performs the segue automagically. But there are controls you can’t create segues from, and times when you might otherwise want programmatic control over performing a segue. For that, you create a segue by dragging from the view controller itself in IB; give the segue a unique identifier, and then in your view controller you can call [self performSegueWithIdentifier:@"myIdentifier"] whenever you want the segue to happen.

    In this case, you’d probably call that from within mapView:annotationView:calloutAccessoryControlTapped:.

    How do I pass my model object to the next view controller in this kind of segue?

    Presumably your model objects conform to the MKAnnotation protocol and you’re adding them to the map with addAnnotation(s):. In that case, when your map delegate’s (presumably your view controller’s) mapView:annotationView:calloutAccessoryControlTapped: method is called, the second parameter has a reference to the corresponding MKAnnotationView. That class has a property annotation which will point back to your model object.

    Of course, in this method you’re just calling performSegueWithIdentifier:, so you don’t yet have access to the destination view controller. So you’ll need to hold onto that model object reference (say, in an ivar) for now, and then your prepareForSegue:sender: implementation can pass it to the destination view controller.

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

Sidebar

Related Questions

I have a single annotation on a map view. I can select it programmaticly,
I have a map view with annotations, and these annotations display a callout. When
In iPad photos application, under Places, you can see a map of where the
I have a map with about 80 annotations. I would like to do 3
Is there any way to customize the map annotation bubbles in Appcelerator Titanium? Specifically,
I have a detail view that is pushed from a map. I am trying
I have a UITableView and each cell contains a Map button. When I tap
I have a map view with pins annotations into it. I need to pass
I have several externally supplied tables which I can't modify. In my case these
I have a class to map a table for using hibernate. There are some

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.