9.14. Use of the status bar

发布时间 : 2025-10-25 13:32:30 UTC      

Page Views: 10 views

The status bar displays key information about the device.

  • Device model or network provider

  • Network signal strength

  • Battery usage

  • time

The status bar is as follows:

statusBar

Ways to hide the status bar

[[UIApplication sharedApplication] setStatusBarHidden:YES]; 

9.14.1. Another way to hide the status bar

We can also hide the status bar by adding rows and selecting UIStatusBarHidden with the help of info.plist, and make its value NO.

9.14.2. Add a custom method hideStatusbar to the class

It hides the status bar for animation and also adjusts the amount of space we think takes up the status bar.

-(void)hideStatusbar{ [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade]; [UIView beginAnimations:@"Statusbar hide" context:nil]; [UIView setAnimationDuration:0.5]; [self.view setFrame:CGRectMake(0, 0, 320, 480)]; [UIView commitAnimations]; } 

Update the viewDidLoad in ViewController.m, as follows:

- (void)viewDidLoad { [super viewDidLoad]; // The method hideStatusbar called after 2 seconds [self performSelector:@selector(hideStatusbar) withObject:nil afterDelay:2.0]; // Do any additional setup after loading the view, typically from a nib. } 

9.14.3. Initial output and output after 2 seconds

statusBarOutput

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。