Can I create an MKAnnotation, or is it read only? I have coordinates, but I am not finding it easy to manually create an MKAnnotation with using setCoordinate.
Ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
MKAnnotation is a protocol. So you need to write your own annotation object that implements this protocol. So your MyAnnotation header looks like:
and your implementation looks like (MyAnnotation.m):
So to add your annotation to the map:
If you wan’t a title and subtitle on the annotation callout, you need to add the title and subtitle properties.