活动指标在我的代码中没有动画 。 我有调试代码
我怎样才能修补它? 是因为暗线没有更新指示器状况吗? 如果是这样, 我怎样才能修补它呢?
@interface ConnectionEstablishedViewController : UIViewController{
IBOutlet UIActivityIndicatorView * activityView;
IBOutlet UILabel *loadingLabel;
}
@property(nonatomic,retain) UIActivityIndicatorView * activityView;
我在我的.xib 文件中指定了标签和活动指标
时 时 时
- (void) threadStartAnimating {
[activityView startAnimating];
loadingLabel.hidden=YES;
}
- (void) threadStopAnimating {
[activityView startAnimating];
loadingLabel.hidden=NO;
}
-(void)viewDidAppear:(BOOL)animated{
[self threadStartAnimating];
[NSThread sleepForTimeInterval:3.0];
[self hunttable];//call hunttable in order to fetch hunt table data
[NSThread sleepForTimeInterval:3.0];//sleep to prevent thread from overlap
[self huntingarea];
[NSThread sleepForTimeInterval:3.0];
[self stands];
[NSThread sleepForTimeInterval:3.0];
[self weapons];
[NSThread sleepForTimeInterval:3.0];
[self backpack];
[NSThread sleepForTimeInterval:3.0];
[self descriptionget];
[NSThread sleepForTimeInterval:3.0];
[self threadStopAnimating];
}