开发者

Do I need to create class implement MKAnnotation protocol for different type to annotation?

开发者 https://www.devze.com 2023-03-30 09:48 出处:网络
I have 2 annotation types say A and B every time I pin a new A annotation I want to delete previous A-pin, but not B-pin this situation is the same with B-pin. Both pins contain just a location and ti

I have 2 annotation types say A and B every time I pin a new A annotation I want to delete previous A-pin, but not B-pin this situation is the same with B-pin. Both pins contain just a location and title. Question is can I use MKPointAnnotation and add some开发者_JAVA百科 kind of tag to separate these two kind of pins for easily unpin or I need to implement two classes for each pin ?


You can either create two classes or create one class and add a "annotationType" property.

The MKPointAnnotation class doesn't have a tag property.

0

精彩评论

暂无评论...
验证码 换一张
取 消