Methods In AppDelegate, and AppDelegate Methods

Source: Internet
Author: User

Methods In AppDelegate, and AppDelegate Methods



Method OverviewdidFinishLaunchingWithOptions:(NSDictionary *)launchOptionsIt is called only when the application is started. The launchOptions below contains parameters when the application is started from outside. If you receive the transfer, click push to open the application.
applicationWillResignActiveApplicationbackgroundBefore calling
applicationDidEnterBackgroundApplicationbackgroundCall
applicationWillEnterForegroundApplicationactiveBefore calling
applicationDidBeconeActiveApplicationactiveCall
applicationWillTerminateApplicationnot runingCalled before (closed)
Common scenarios:

  1. Start the application:

    • didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    • applicationDidBeconeActive
  2. Click home in the application:

    • applicationWillResignActive
    • applicationDidEnterBackground
  3. The application runs in the background and opens the application again:

    • applicationWillEnterForeground
    • applicationDidBeconeActive
  4. Double-click home to select the current application:

    • applicationWillResignActive
    • applicationDidBeconeActive
  5. Double-click home to select another application:

    • applicationWillResignActive
    • applicationDidEnterBackground
  6. Double-click home to close the application:

    • applicationWillResignActive
    • applicationDidEnterBackground
    • applicationWillTerminate



Status related to several methods in AppDelegate: 1.not running2.background3. active
The actual application status: (see the iOS Application Status switch off http://blog.csdn.net/duanyipeng/article/details/7101829)
1. not running2.background3. active4.inactive5. suincluded

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.