UIApplication, iosuiapplication
1. Perform some application-level operations (such as displaying numbers on the application icons ):
-(IBAction) changeAppNum {
UIApplication * app = [UIApplication sharedApplication];
// 1. Set whether to display the color of the text icon in the status bar and status bar. If you want to use UIApplication in iOS7.0, set View controller-based status bar appearance = NO in Info. plist.
// [App setStatusBarHidden: YES withAnimation: UIStatusBarAnimationFade];
// App. statusBarHidden = YES;
// App. statusBarStyle = UIStatusBarStyleLightContent;
[App setStatusBarStyle: UIStatusBarStyleLightContent animated: YES];
// 2.
// 0 indicates clearing the number in the upper-right corner of the icon
// App. applicationIconBadgeNumber = 0;
// Set the display of the network status (Chrysanthemum circled on the top of the screen ).
// App. networkActivityIndicatorVisible = YES;
// URL: the unique path of a resource.
// URL composition = protocol header: // host domain name/path
// Composition of network resource URL = http://www.baidu.com/1.png
// Local resources (access resources on your mobile phone or computer). Do not write the domain name.
// Composition of the local file resource URL = file: // Users/apple/Desktop/1.png
// Advantages of using an app to open resources: automatically identifies the protocol type and determines what to open.
// [App openURL: [NSURL URLWithString: @ "http://ios.itcast.cn"];
// Call
// [App openURL: [NSURL URLWithString: @ "tel: // 10086"];
}
Ii. UIApplication's delegate:
/** Called when the app enters the background. Generally, the app data (game data, such as suspending the game) is stored here )*/
-(Void) applicationDidEnterBackground :( UIApplication *) application
{
NSLog (@ "applicationDidEnterBackground ");
}