UIApplication is a symbol of an application and is a single-instance object
Method:
OpenURL (phone, texting)
Address of the Nsurl resource unique path
Specification: Protocol header://Host address/resource path
Network resources: Http://www.baidu.com/image/123.png
Local resources: File:///user/desktop/image/321.png
The status bar is given to application management (add the following command to the system Info.plist file)
View controller-based status bar appearance = NO
Note: IOS6 uses application management
IOS 7 8 Using Controller management
Controller Management
Style of the status bar
-(Uistatusbarstyle) Preferredstatusbarstyle;
Visibility of the status bar
-(BOOL) Prefersstatusbarhidden;
UIApplication Management
To set the visibility of the status bar through application
App.statusbarhidden = YES;
[App Setstatusbarhidden:yes Withanimation:uistatusbaranimationslide];
To set the style of the status bar by application
App.statusbarstyle = uistatusbarstylelightcontent;
[App Setstatusbarstyle:uistatusbarstylelightcontent Animated:yes];
//Open Web pageUIApplication *app =[UIApplication sharedapplication]; Nsurl*url = [Nsurl urlwithstring:@"http://www.baidu.com"]; [App Openurl:url]; //set whether the taskbar is hiddenApp.statusbarhidden =YES; //animate when taskbar is hidden[app Setstatusbarhidden:yes Withanimation:uistatusbaranimationfade]; //set the style of the taskbarApp.statusbarstyle =uistatusbarstylelightcontent; //load Animation When setting the taskbar style[app Setstatusbarstyle:uistatusbarstylelightcontent Animated:yes]; //show Daisy with a netApp.networkactivityindicatorvisible =YES; //Set icon NotificationsUIApplication *app =[UIApplication sharedapplication]; //First judge the version number if([[[[Uidevice currentdevice]systemversion]floatvalue]>=8.0) { //Create user Pass settings (this method must be performed after IOS8)Uiusernotificationsettings *noti =[uiusernotificationsettings Settingsfortypes:uiusernotificationtypebadge Categories:nil]; //Registration Permissions[app Registerusernotificationsettings:noti]; } //Display the number of icon notificationsApp.applicationiconbadgenumber = -;
Summary of single-instance uiapplication for iOS and some common methods