开发者

iPhone UILabel Hidden weirdness between OS 3.0 and 4.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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜