I'm trying to pre-load an array of texture atlases during which a UIActivityIndicator is displayed. Once the textures are loaded I want to stop the activity indicator using the .stopAnimating() method. I've inserted breakpoints and found that the compiler does get to the .stopAnimating() method, but nothing happens...the indicator continues...
What am I doing wrong here?
class Menu: SKScene {
var activityInd: UIActivityIndicatorView!
override func didMoveToView(view: SKView) {
activityInd = UIActivityIndicatorView(activityIndicatorStyle: .WhiteLarge)
activityInd.center = CGPointMake(self.frame.midX, self.frame.midY)
activityInd.startAnimating()
scene!.view?.addSubview(self.activityInd)
SKTextureAtlas.preloadTextureAtlases([saxAtlas, saxIdleAtlas, drumAtlas, drumIdleAtlas, pianoAtlas, pianoIdleAtlas, bassAtlas]) { () -> Void in
self.activityInd.stopAnimating()
}
}