I am new to iphone development.I have created map applications and displayed the cuurent location and drop a pin to the current location.On clicking the button “Find Me”, it drops a pin in my current location.Once again if i click the “Find Me” button it drops a pin but i am able to see the previously dropped pin in my current location. So i want to remove the previously dropped pin when i am clicking the “Find Me” button twice. Please help me out.
Thanks.
Store your annotation object somewhere and when you want to remove it just call
-removeAnnotation:method with it:Note also that if you set your map view’s
showsUserLocationproperty to YES it will automatically track user location using Core Location framework services and display it on the map.