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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:05:22+00:00 2026-06-13T05:05:22+00:00

I try to call a method when the annotation view (and only the annotation

  • 0

I try to call a method when the annotation view (and only the annotation view) is clicked.

- (void)mapView:(MKMapView *)m didSelectAnnotationView:(MKAnnotationView *)view {

            [self openDetailView];            

}

But what i noticed, is that this method (openDetailView) is called only when i select the PIN, means before the annotation view gets displayed. How can i fire that method on callout click? Thanx 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-06-13T05:05:23+00:00Added an answer on June 13, 2026 at 5:05 am

    By adding button with arrow instead of callout:

    - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation {
        if ([annotation isMemberOfClass:[MKUserLocation class]]) {
            return nil;
        }
        MKPinAnnotationView *v =[[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"ku"] autorelease];
        UIButton *button = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
        button.frame = CGRectMake(0, 0, 24, 24);
        Shop *shop = [(ShopAnnotation *)annotation myShop];
        button.tag = [shop.ID intValue];
        [button addTarget:self action:@selector(callOutPressed:) forControlEvents:UIControlEventTouchUpInside];
        [button setImage:[UIImage imageNamed:@"map_arr_right.png"] forState:UIControlStateNormal];
    
        v.rightCalloutAccessoryView = button;
        v.canShowCallout = YES;
        return v;
    }
    
    - (void) callOutPressed:(id)sender {
    
        NSLog(@"callout pressed");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to call a method with a float parameter but the value the
in my application (using spring), i try to call a method from view using
I created this method, but when i try to call the method it returns
Update getting error when i try to call the method from Activity: SQLiteDatabase db
for some reason when I try to call CocoaAsyncSocket's onSocket:didReadData:withTag method, it's failing and
I have this code to try and call a method from my controller in
I am trying to bypass the call JNIEnv->DefineClass method with all necessary parameter but
When I try to call the method after importing the class, like below, I
When I try and call any method on a COM Object that takes one
i have wcf service hosed in sharepoint application. But when i try to call

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.