0

In my app am adding subtitle to annotation pin but don't want to show with pin. I am just using it for coding purpose. How can I hide?

khadar
  • 137
  • 1
  • 10

1 Answers1

1

If the subtitle property of your annotation class is set to a non-blank value, it will display in the callout.

If you need to store data with the annotation but not display it in the callout, create a separate property for it (that's not named title, subtitle, or coordinate).

Leave subtitle blank or just don't implement the property in your annotation class (it's optional).

  • Thanks Anna for looking at ny problem – khadar Aug 10 '12 at 12:22
  • can you suggest me through some code how to do it.....Thanks in adv – khadar Aug 10 '12 at 12:23
  • In your annotation class .h, add an NSString property just like subtitle but name it something else. Then where you create annotations, set that property instead of subtitle. –  Aug 10 '12 at 12:32
  • Were you able to code it or do you need an actual example? –  Aug 10 '12 at 13:44
  • 1
    I added an example on your new question: http://stackoverflow.com/questions/11931814/how-to-show-only-pinannotation-title-in-map-view –  Aug 13 '12 at 13:11