嗨,我想根据存储在数组中的纬度和经度的值来显示MKPinAnnotationView,但是我希望所有的引脚不应该同时出现。它应该是一个接一个,意思是,当一个引脚出现在某个延迟之后,另一个引脚出现。
提前感谢
发布于 2014-01-30 06:35:25
使用NSTimer来完成它:如下所示:
-(Void)viewDidLoad{
_timer = [NSTimer scheduledTimerWithTimeInterval:1.0f
target:self
selector:@selector(_timerFired)
userInfo:nil
repeats:YES];
}
- (void)_timerFired
{
//Code to add the Annotation
// Completed the annotation, then nil the Timer
if (_timer != nil && <annotationArray_reached_end>)
{
[_timer invalidate];
_timer = nil;
}
}https://stackoverflow.com/questions/21449237
复制相似问题