2014-01-30 79 views
0

嗨我想顯示MKPinAnnotationView基於存儲在數組中的緯度和經度的值,但我希望所有的引腳不應該同時出現。它應該是一個接一個,意思是當一個引腳出現一段時間後,另一個引腳出現。提前顯示MKPinAnnotationView不同時

+0

使用的NSTimer得到實現這一 –

回答

0

使用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; 
    } 
} 
+0

找你歡迎... –