1. Introduction
1> A symbol of the entire application, an application on a UIApplication object, using a singleton design pattern
2> access to this singleton object via [UIApplication sharedapplication]
2. Common usage
1> set icon in the upper right corner of the red hint number
App.applicationiconbadgenumber = 10;
2> Setting the style of the status bar
App.statusbarstyle = Uistatusbarstyleblackopaque;
3> Control the display and hiding of the status bar
App.statusbarhidden = YES;
4> Show the circle above the status bar
app.networkactivityindicatorvisible = YES;
5> Open External resources
Open Web page
[App Openurl:[nsurl urlwithstring:@ "http://www.baidu.com"];
Call
[App Openurl:[nsurl urlwithstring:@ "tel://10086"];
Texting
[App Openurl:[nsurl urlwithstring:@ "sms://10086"];
6> Agent Properties (when the application has some system-level events, the agent is notified and sent to the agent for processing)
@property (nonatomic,assign) ID delegate;
Proxy methods for Uiapplicationdelegate
The pragma mark program is loaded (boot complete) and is called once
pragma mark when the application loses focus (an app cannot interact with the user if it loses focus)
The pragma mark program enters the background and calls
Pragma mark program is about to enter the foreground when the call
Called when the pragma mark application gets focus (an app can interact with the user only after the focus has been focused)
pragma mark program may be called when it is about to be closed
The pragma mark program receives a memory warning called
This article is from the "the Templar's iOS" blog, so be sure to keep this source http://10646127.blog.51cto.com/10636127/1690223
UIApplication Application, black box