Q:

Updating the subtitle in annotationView

Is there a way to keep updating the subtitle string in an annotationView? The subtitle string gets it value from another class which is updating the value every second. Is it possible to get the subtitle in the annotationView to keep updating itself?

A:

Create a method which update the value of your subtitle and call this method in main thread. All UI related changes should go in main thread.
[self performSelectorOnMainThread:<#(SEL)#> withObject:<#(id)#> waitUntilDone:<#(BOOL)#>]

-(void)updateValue 
 { 
      if(![NSThread isMainThread]) 
      { 
         [self updateValue]; 
         return; 
      } 
      update your values here. 
 } 

