简体   繁体   中英

MAPKIT: Blue dot just stopped animating! User location

This seems pretty simple and gives a great graphics effect, the animated blue dot with the pulsating circle. This code worked perfect for me. Then just STOPPED. Strange! Can't figure it out. Can't remember changing one line. Just no longer pulses ... even reinstalling app on phone. Hmmmmm, does it stop if it finds a perfect location? Not sure . . . thanks!

if ([myTitle isEqualToString:@"Current Location"]){

        pin.animatesDrop = YES;
        return nil;
    } else {
        [pin setPinColor:MKPinAnnotationColorPurple];
        pin.leftCalloutAccessoryView = button;
}

The blue dot will no longer pulse once the location is locked. The pulsing is a way of showing that it is an approximate location.

Have you tried removing the following line:

return nil; 

Return nil means that no annotationView is returned, show there is nothing to show.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM