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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:03:04+00:00 2026-06-08T03:03:04+00:00

in iOS 5.0, I first place annotations on the map and also set the

  • 0

in iOS 5.0, I first place annotations on the map and also set the centre offset to CGPointMake(0,-annotationView.frame.size.height/2); right after setting the custom image for the annotation in the mapView:viewForAnnotation: method… after this the pins still appear at the original position which would be the case when the centre offset was not applied.

However, when I pinch or zoom the map, the annotation jumps to the correct position as would be the case with the centerOffset being set and then behaves correctly..

What could be the reason and solution for this?

Any help would be much appreciated.

Baffled!!

  • 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-08T03:03:05+00:00Added an answer on June 8, 2026 at 3:03 am

    I was finally able to solve it by subclassing the MKAnnotationView and in the initWithAnnotation:reuseIdentifier: constructor method, synchronously get the annotationView image and then set the centerOffset to CGPointMake(0.0, -img.size.height/2);

    If there are too many annotations, this will slow down the display of annotations, so would need to handle that differently.

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

Sidebar

Related Questions

This will be my first iOS app with any bit of complexity. I'd like
I'm nearly finished with writing my first iOS application, but I ran into a
I'm about to start work on my first big iOS app, but haven't really
I'm an experienced C/C++ Windows developer writing my first real iOS application. Since I
When I first started my iOS project I could use capital letters in core
I'm moving my first stpes in iOS development. I have followed the first part
Its my first time to use web service in iOS. REST was my first
First of all I have to say I am new to iOS development. My
First, I'm new to iOS and Objective-C programming (I started a month ago). I'm
I'm developing a first iPhone app for iOS 4.x/5.0 and have some confusions on

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.