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?
Asked
Active
Viewed 579 times
0
-
do you want to show the callout without annotation Pin?? – Tripti Kumar Aug 10 '12 at 10:24
-
no I want to show the annotation without subtitle.... – khadar Aug 10 '12 at 11:31
-
use [YourAnnotationView canShowCallout = NO]; – Tripti Kumar Aug 10 '12 at 11:44
-
i need to show title in callout but not subtitle? – khadar Aug 10 '12 at 12:27
1 Answers
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).
-
-
-
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
-
-
1I 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