tags:

views:

4

answers:

0

When I initially load my view there is a spinner and "Loading..." label displayed. However, after my data is loaded, the spinner and label appear on screen for a good 2 seconds. I did some debugging and my method is getting called and completes before these elements hide. It's like there's a lag.

The method:

- (void)isLoadingData:(BOOL)flag {
    NSLog(@"here %d", flag);
    if (flag) {
        [spinner startAnimating];
    }
    else {
        [spinner stopAnimating];
    }
    [loadingData setHidden:!flag];
    NSLog(@"done");
}

The ivars:

IBOutlet UILabel *loadingData;
IBOutlet UIActivityIndicatorView *spinner;

I haven't changed anything with this code other than updating the app from 3.0 SDK to 4.1 SDK. The odd thing is on my test device, with 3.1.3, I don't have a problem. But 4.0+ Simulator and device have the lag.

Seems SDK related, but I don't want to jump the gun. Any help would be appreciated.