Questions tagged [mkpinannotationview]

MKPinAnnotationView implements an MKAnnotationView to display a push pin and is the only system-provided annotation view.

MKPinAnnotationView implements an MKAnnotationView to display a push pin and is the only system-provided annotation view. It is the pin used in the Apple Maps application and enjoys widespread use in third party apps as well. Red, green, and purple pins are the only pin colors supported as of iOS 6.

For more information, see the Apple Documentation for MKPinAnnotationView.

165 questions
1
vote
2 answers

ViewForAnnotation not Called in Swift 3

I want to open a new viewcontroller when i click the PinAnnotation. But ViewForannotation is not calling when i click, But It is showing a pop up message when i click on Pin. Don't know what is happening. Here is my Code: import UIKit import…
1
vote
0 answers

how can I do make MKMapView's pin moving on Photo Album Places view of ios4

In iOS4's photo album place, the photo-pins join and split each others when the map is zoomed out and in. It's awesome experience! and I want to use same thing on my apps. I guess, it should not be one of MapKit. does anybody know that how can i do…
sng2c
  • 31
  • 3
1
vote
1 answer

Hide map pin annotation image

I am creating a map application which allows emojis to be attached to locations. Currently, the image is displayed above the stock apple map annotation. I wish to hide the stock pin image while still displaying the selected emoji by the user. Is…
Oscar
  • 511
  • 2
  • 10
  • 25
1
vote
1 answer

Reset map pins with button via Popover

I am making a small map application. I want to be able to reset the pins (memories), the user has dropped. I want this to be done through a "Reset memories" button, displayed via Popover: I have this code for my main view controller class which…
Oscar
  • 511
  • 2
  • 10
  • 25
1
vote
1 answer

What is the best way to save map pins so that user can come back to the pins that were previously created using Swift?

I have a map where a user can create pins by a long press recognizer. When a pin is opened, it opens an annotation view with a button. If that button is pressed, it segues into another viewController. That last viewController has a button that…
IvOS
  • 323
  • 3
  • 13
1
vote
1 answer

MKMapView click on pin causes weird frame changes

I created not custom, simple pin annotations on MKMapView and when I click on it, I'm getting following for my MapView: It happens only on iOS8. I figured out that without constraints for mapView - it works fine. Constraints are simple - just to be…
Injectios
  • 2,777
  • 1
  • 30
  • 50
1
vote
0 answers

Custom callouts are all showing on the map after annotation added

I am creating custom MKPinAnnotationView, and after the annotation are added to map view. All of them are displaying on the map. But I don't want that, I only want to open the callout when I click on the pin and then show the callout. Right now my…
yong ho
  • 3,892
  • 9
  • 40
  • 81
1
vote
0 answers

how to add animation for annotation on tap the MKPinAnnotationView?

I have a custom pin in my map view , and I need to enlarge the pin when I tap it, and return to its default size when I press on other pin, just like the foursquare app this is the code I have for enlarge it, but how I can return it to its default…
1
vote
1 answer

Display different images for every annotation on mapView in Swift

Working with MapKit and Swift, I am trying to display a number of annotations with each having a unique image to display in the leftCalloutAccessoryView. I am able to display annotations with different titles and subtitles; however, the image that…
jasenlew
  • 443
  • 1
  • 6
  • 7
1
vote
0 answers

How to add image views to custom annotation view keep pin image on screen and take touches from it?

I have a mapview with pins that show location of photo (coordinates are taken from CoreData) and I need to show photo when pin is selected (using its URL and AFNetworking). I need to save both pin image and photo image when pin is selected. If next…
1
vote
2 answers

Custon MKPinAnnotationColor

I have searched a bit on google, but didn't really found an answer to my question. I want to create a pin with a different color, e.g. yellow or orange. How should I do this? It seems that it's not possible to create one sending a UIColor to it.…
Paul Peelen
  • 10,073
  • 15
  • 85
  • 168
1
vote
1 answer

MKPinAnnotationView color is not working

I am trying to show some pins from an array, it shows them all but they are red, and not green as i ask them to be. Why is that ? //run on array to get all locations for(int k=0;k<[array count];k=k+2) { float targetlat=[[array…
Curnelious
  • 1
  • 16
  • 76
  • 150
1
vote
3 answers

viewForAnnotation didn't get called (iOS noob)

I know this question has been asked by others before and i have read them in this forum previously, but I have tried all the proposed approach without luck so far so I decided to post this question. I have this piece of code below which is meant to…
Chris Wijaya
  • 1,276
  • 3
  • 16
  • 34
1
vote
1 answer

Add thumbnail to an MKPinAnnotation

I have this Custom MKPinAnnotation to which I need to add an image(Like a thumbnail). I should also be able to open the image fullscreen by tapping it. What is the best way to go around doing this?
Black Magic
  • 2,706
  • 5
  • 35
  • 58
1
vote
1 answer

MKMapView iOS custom user location Annotation not showing/updating position

Hi I am using a custom annotation in replacement of the blue GPS position dot. I have added it to the map like so in the viewForAnnotation. OurLocAnnotation class conforms to MKAnnotation delegate. //Custom location view if([annotation…