在加载信息时,我的应用中有UIActivityIndicatorView。所以IN模拟器ios 4.3它工作正常但在ios5.0中我看不到它。怎么了?如果您需要代码,请告诉我。谢谢
答案 0 :(得分:1)
-(void)Viewdidload
{
UIActivityIndicatorView *activity = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
[activity setFrame:CGRectMake(0, 0, 20, 20)];
[self.view addSubview:activity];
}
-(void)PressLoginBtn
{
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
[activity startAnimating];
// call another controller
}
- (void)viewWillDisappear:(BOOL)animated
{
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
[activity stopAnimating];
}