How do I animate MKAnnotationView drop?

One problem with the code above by Anna Karenina is that it doesn’t deal with when you add annotations below where the user is looking at the moment. Those annotations will float in mid-air before dropping because they are moved into the user’s visible map rect. Another is that it also drops the user location … Read more

CLLocation Category for Calculating Bearing w/ Haversine function

Your code seems fine to me. Nothing wrong with the calculous. You don’t specify how far off your results are, but you might try tweaking your radian/degrees converters to this: double DegreesToRadians(double degrees) {return degrees * M_PI / 180.0;}; double RadiansToDegrees(double radians) {return radians * 180.0/M_PI;}; If you are getting negative bearings, add 2*M_PI to … Read more

Calculate new coordinate x meters and y degree away from one coordinate

Unfortunately, there’s no such function provided in the API, so you’ll have to write your own. This site gives several calculations involving latitude/longitude and sample JavaScript code. Specifically, the section titled “Destination point given distance and bearing from start point” shows how to calculate what you’re asking. The JavaScript code is at the bottom of … Read more

MapKit not showing custom Annotation pin image on iOS9

Instead of creating an MKPinAnnotationView, create a plain MKAnnotationView. The MKPinAnnotationView subclass tends to ignore the image property since it’s designed to show the standard red, green, purple pins only (via the pinColor property). When you switch to MKAnnotationView, you’ll have to comment out the animatesDrop line as well since that property is specific to … Read more

Alert view disappears on its own when calling [locationManager requestWhenInUseAuthorization];

You’re probably being ARC’d. Make sure that you still have a reference to your CLLocationManager. You can easily do this by making it a property. ARC stands for Automatic Reference Counting. In an ARC-enabled project (and unless you are working on something really old or you turned it off on purpose, your project is an … Read more