1. Succession chain: Uiresponder:nsobject
2. UsesharedApplication方法来存取对象
3. This class can abide by the agreement is Uiapplicationdelegate
4. Get an instance of the app
(1) + (uiapplication *)sharedapplication : Returns a single app instance
5. Get the app delegate
(1) @property(nonatomic, assign) ID< uiapplicationdelegate > delegate : Set Delegate
6. Get the App window
(1) @property(nonatomic, readonly) uiwindow *keywindow : Key window of the app
(2) @property(nonatomic, readonly) nsarray <__kindof UIWindow *> *windows : Returns an array of visible, hidden windows of the app
7. Control and Control events
(1)-(void) sendevent: (uievent *) event
: Dispatches an event to the appropriate response object in the app
(2)-(bool) sendaction: (sel) action
to: (id) target
from: (id) Sender
forevent: ( span class= "n" >uievent *) event
:
action |
A Selector identifying an action method. See the discussion for information on the permitted selector forms. |
target |
The object to receive the action message. If target nil is, the app sends the message to the first responder, from whence it progresses up the responder chain Unti L it is handled. |
sender |
The object is sending the action message. The default sender is the UIControl object, the invokes this method. |
event |
A UIEvent object that encapsulates information about the event originating the action message. |
(3)-(void)beginignoringinteractionevents : Call this method to notify the receiver to delay processing and touch-related events before starting the animation and conversion
(4)-(void)endignoringinteractionevents : Call this method after calling the method, animation, or conversion above to notify the receiver to re-process and touch the related event
(5)-(BOOL)isignoringinteractionevents : Returns whether a Boolean value allows the receiver to ignore touch events that occur on the screen
(6) @property(nonatomic) BOOL applicationsupportsshaketoedit : A Boolean value determines whether the device shake can be displayed Undo-redo user interface
8. Open a URL resource
(1)-(BOOL)OpenURL: (nsurl *) url
: Attempt to open the specified URL, return the value to determine whether it can be opened
(2)-(BOOL)canopenurl: (nsurl *) url
: Returns a Boolean value that determines whether the app can open a specified URL path
9. Configure user notification settings
(1)-(void)registerusernotificationsettings: (uiusernotificationsettings *) notificationSettings
: Registration Notification Preferences
(2)-(uiusernotificationsettings *)currentusernotificationsettings : Returns the notification settings currently set for the app
10. Registering a remote notification
(1)-(void)registerforremotenotifications : Registering a remote notification
(2)-(void)unregisterforremotenotifications : refuses to accept any remote notifications
(3)-(BOOL)isregisteredforremotenotifications : Returns a Boolean value that determines whether the current enlistment is a remote notification
11. Register Local Notifications
(1)-(void)schedulelocalnotification: (uilocalnotification *) notification
: Time notification for delivery of local encapsulation
(2)-(void)Presentlocalnotificationnow: (uilocalnotification *) notification
: Show local notifications now
(3)-(void)cancellocalnotification: (uilocalnotification *) notification
: Cancels delivery of the specified local timesheet notification
(4) @property(nonatomic, copy) nsarray <uilocalnotification *> *scheduledlocalnotifications : Local notifications for all current timesheets
12. Manage Background execution
(1) @property(nonatomic, readonly) uiapplicationstate applicationstate : The state of the app runtime
(2) @property(nonatomic, readonly) nstimeinterval backgroundtimeremaining : The time the app runs in the background
(3) @property(nonatomic, readonly) uibackgroundrefreshstatus Backgroundrefreshstatus : Programs that have the ability to execute in the background
(4)-(void)Setminimumbackgroundfetchinterval: (nstimeinterval) minimumBackgroundFetchInterval
: Specifies when the program waits for execution
(5)-(uibackgroundtaskidentifier)beginbackgroundtaskwithname: (nsstring *) taskName
Expirationhandler: (void (^) (void)) handler
: Uses the specified name to flag a new long-running background task
(6)-(uibackgroundtaskidentifier)beginbackgroundtaskwithexpirationhandler: (void (^) (void)) handler
: Marks the start of a new long-running background task
(7)-(void)Endbackgroundtask: (uibackgroundtaskidentifier) identifier
: Indicates that the specified background task has ended
13. Managing Idle time for Apps
(1) @property(nonatomic, getter=isidletimerdisabled) BOOL idletimerdisabled : Whether idle time can be used by the app
14. Managing the status of Recovery behavior
(1)-(void)extendstaterestoration : Tells app code to start an asynchronous recovery state
(2)-(void)completestaterestoration : tells the app that it has been asynchronously restored
(3)-(void)ignoresnapshotonnextapplicationlaunch :P revents the app from using the recent snapshot imag e during the next launch cycle.
(4) + (void)registerobjectforstaterestoration: (id<uistaterestoring>) object
Restora Tionidentifier: (nsstring *) restorationIdentifier
: Registering a custom object for the state recovery system
15. Manage Home screen Quick Actions for 3D Touch
(1) @property(nonatomic, copy) nsarray <uiapplicationshortcutitem * > *shortcutitems : Set this property to Register an array of dynamic quick actions to display on the Home screen when a user presses your app icon.
16. Decide what you can protect
(1) @property(nonatomic, readonly, getter=isprotecteddataavailable) BOOL protecteddataavailable : The return value determines whether the content is protected
17. Registering Remote Control Events
(1)-(void)beginreceivingremotecontrolevents : Tell the app to start accepting remote control events
(2)-(void)endreceivingremotecontrolevents : Tell the app to end accepting remote control events
18. Control the display of the app
(1) @property(nonatomic, readonly) cgrect statusbarframe : reads the position and size of the status bar
(2) @property(nonatomic, getter=isnetworkactivityindicatorvisible) BOOL networkactivityindicatorvisible : Is the network able to use
(3) @property(nonatomic) nsinteger applicationiconbadgenumber : The number currently set as the badge of the app icon in Springboard.
(4) @property(nonatomic, readonly) uiuserinterfacelayoutdirection Userinterfacelayoutdirection : Returns the layout direction of the user interface
18. Get Font Size preference
(1) @property(nonatomic, readonly) nsstring * Preferredcontentsizecategory : User preferred Font Size selection
19. Managing the default interface orientation
(1)-(uiinterfaceorientationmask)Supportedinterfaceorientationsforwindow: (UIWindow *) window
: Returns the interface orientation supported by the specified window
20. Manage the orientation of the status bar
(1) @property(nonatomic, readonly) nstimeinterval Statusbarorientationanimationduration : Animated transitions in the status bar when the device is 90 degrees in transition
21. Data type
(1) Uistatusbarstyle type
Uistatusbarstyledefault,: Black status bar
Uistatusbarstylelightcontent,: Bright status bar
Uistatusbarstyleblacktranslucent,: Black transparent status bar
Uistatusbarstyleblackopaque: Black opaque status bar
(2)UIStatusBarAnimation类型
Uistatusbaranimationnone: There is no animation when the status bar is displayed and hidden
Uistatusbaranimationfade: Use fade fade animation when status bar is displayed and hidden
Uistatusbaranimationslide: Use sliding animations when the status bar is displayed and hidden
22. Constant (1) Uiapplicationstate constantuiapplicationstateactive: app is running on the front and accepting events uiapplicationstateinactive: app is running on the front end but not accepting events uiapplicationstatebackground : App is running in the background (2) Background Task constants constantConst uibackgroundtaskidentifier uibackgroundtaskinvalid; : This constant should be used to initialize a constant or to check for an error Const nstimeinterval uiminimumkeepalivetimeout; : The time the app should run in the background
(3) Uibackgroundfetchresult Constants
Uibackgroundfetchresultnewdata,: New data successfully loaded
Uibackgroundfetchresultnodata: No new data can be loaded into
Uibackgroundfetchresultfailed: Data Load Failure
23. Notice
(1) Uiapplicationbackgroundrefreshstatusdidchangenotification: This notification is sent when the value of the Backgroundrefreshstatus property changes
(2)UIApplicationDidBecomeActiveNotification :当app将要成为活跃状态的时候就会发送这个通知
(3) Uiapplicationdidchangestatusbarframenotification: This notification will be sent when the frame of the status bar has been changed to the end
(4) Uiapplicationdidchangestatusbarorientationnotification: This notification is sent when the orientation of the app's user interface changes
(5) Uiapplicationdidenterbackgroundnotification: This notification is sent when the app is in the background
(6) Uiapplicationdidfinishlaunchingnotification: This notification will be sent when the app finishes booting
(7)UIApplicationDidReceiveMemoryWarningNotification :当可用运行内存不足的时候就会发送这个通知
(8) Uiapplicationprotecteddatadidbecomeavailable: This notification is sent when the protected file is ready to be used
(9) Uiapplicationprotecteddatawillbecomeunavailable: This notification is sent when a protected file is locked and becomes not available
(10) Uiapplicationsignificanttimechangenotification: This notification is sent when there is a significant time change, such as changing to a new day
(11) Uiapplicationuserdidtakescreenshotnotification: This notification is sent when the home button and the button are pressed
(12) Uiapplicationwillchangestatusbarorientationnotification: This notification is sent when the app changes the direction of the interface
(13) Uiapplicationwillchangestatusbarframenotification: This notification is sent when the frame of the status bar starts to change
(14) Uiapplicationwillenterforegroundnotification: This notification is sent when the app is going to be active from the background to the front end
(15) Uiapplicationwillresignactivenotification: This notification is sent when the app is no longer active or out of focus
(16) Uiapplicationwillterminatenotification: This notification will be sent when the app terminates
(17) Uicontentsizecategorydidchangenotification: This notification is sent when the user changes the set content size
The uiuiapplication of Uikit frame