I am aware of my problem but cannot find a solution. When the button is pressed it tells the UIActivityIndicatorView to startAminating and also retrieve data from a XML feed. Problem I am having is it runs the whole event before starting the animating of the loader, so the loader never spins before the data is retrieved. How can I start the loader's animation and then once it has started continue with getting data from the XML feed?
-(IBAction)getXMLData {
[loader startAnimating];
[self retrieveXML];
}
.
. code
. more code
.
-(void)retrieveXMLEnded {
[loader stopAnimating];
}