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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:24:21+00:00 2026-06-07T11:24:21+00:00

I am displaying a custom UIView when the user clicks on the pin (Like

  • 0

I am displaying a custom UIView when the user clicks on the pin (Like the Zillow app). Now the problem is that I need to place the view right above the actual pin. The MKAnnotationView coordinates system is related to the map. How can I get the coordinates with respect to the iPhone screen and then place my view on that coordinate.

- (void)mapView:(MKMapView *)mv didSelectAnnotationView:(MKAnnotationView *)view
{  
    // get view from storyboard 
    ZillowSearchResultAnnotation *annotation = (ZillowSearchResultAnnotation *) view.annotation;

    PropertyAbstractViewController *propertyAbstractViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PropertyAbstractIdentifier"];
    propertyAbstractViewController.view.frame = CGRectMake(0, 0, 100, 100);

    [propertyAbstractViewController bind:annotation.data];

    [mv addSubview:propertyAbstractViewController.view];

}
  • 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-07T11:24:23+00:00Added an answer on June 7, 2026 at 11:24 am

    Use convertCoordinate:toPointToView:. Something like:

    UIView *view = ...
    CGPoint p = [mv convertCoordinate:annotation.coordinate toPointToView:mv];
    CGRect frame = CGRectMake(p.x,p.y,view.frame.size.width,view.frame.size.height);
    view.frame = frame;
    [self.view addSubView:view];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a relatively basic news-reader app that involves displaying news in a custom
I have a custom view for displaying application status messages that I slide over
I have a custom UIView that I am displaying as a callout when the
I have a custom CursorAdapter that is taking items from a database and displaying
I'm writing a news-app and I'm having some trouble with displaying a custom list.
For the custom requirement, i need to handle displaying of Cell, i.e. In short
I tried the following code, in an attempt to get the custom view displaying
I'm creating a custom module for displaying VirtueMart categories, but need to disable VirtueMart
I am displaying many rows of data in a list view that is bound
I have a UIPopoverViewController that is displaying a custom UIViewController properly. When I click

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.