iPhone UILabel OS 3.0和4.0之间隐藏的怪异之处
当我最初加载视图时,会显示一个微调器和“正在加载...”标签。但是,加载数据后,旋转器和标签会在屏幕上显示 2 秒钟。我做了一些调试,我的方法在这些元素隐藏之前被调用并完成。好像有一个滞后。
方法:
- (void)isLoadingData:(BOOL)flag {
NSLog(@"here %d", flag);
if (flag) {
[spinner startAnimating];
}
else {
[spinner stopAnimating];
}
[loadingData setHidden:!flag];
NSLog(@"done");
}
ivars:
IBOutlet UILabel *loadingData;
IBOutlet UIActivityIndicatorView *spinner;
除了将应用程序从 3.0 SDK 更新到 4.1 SDK 之外,我没有对这段代码进行任何更改。奇怪的是,在我的测试设备上,3.1.3 没有问题。但4.0+模拟器和设备有延迟。
似乎与 SDK 相关,但我不想操之过急。任何帮助将不胜感激。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论