自定义状态栏中的UIActivityIndicatorView
activityView = [[UIActivityIndicatorView alloc]
initWithFrame:CGRectMake(100.0f,
0.0f,
10.0f,
10.0f)];
activityView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
activityView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin
| UIViewAutoresizingFlexibleRightMargin
| UIViewAutoresizingFlexibleTopMargin
| UIViewAutoresizingFlexibleBottomMargin;
activityView.hidesWhenStopped = YES;
[self.navigationController.view addSubview:activityView];
[activityView.startAnimating];//开启动画
[activityView stopAnimating];//停止动画
隐藏状态栏:
[UIApplication sharedApplication].statusBarHidden = YES;或者
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
修改,Resources中的XXX.plist 文件,双击文件后,如果存在status Bar is initially Hidden 勾选复选框 隐藏,否则显示.
如果不存在该选项可以自己添加,右键add row
增加网络连接状态: [ UIApplication sharedApplication ] .networkActivityIndicatorVisible = YES ;