iOS project Common Files, uiapplication and Uiapplicationdelegate proxy methods

Source: Internet
Author: User

1 I. Common documents of the project2 1. MAIN.M3*inside there is a program entry: main function4 5 2. PREFIX.PCH file6*the contents of the PCH file can be shared by any other file in the project \ contains \ Access7* If the defined content is used only in the OC environment, it must be defined in the#ifdefbetween __objc__ and #endif8 9 3. Automatically remove print statements when you publish a programTen #ifdefDEBUG One #defineMyLog (...) NSLog (__va_args__) A #else - #defineMyLog (...) - #endif the  - 4. Infoplist.strings -*localization related to the app (multi-language version) -  + 5. Info.plist - 1>Global configuration file +  A 2>comparison of old and new configuration files at Xcode3, the Global profile name: Info.plist -Xcode4 start, Global Profile Name: Project Name-Info.plist -  - 3>do not include the word info in the custom plist file in your project -  - 4>Common Configurations in Bundle display Name: Software name - Unique identification of Bundle Identifier:app toBundle versionsstring, Short: Software version number (update app) +Main Storyboard FileBaseName: Set the storyboard file to load when the program starts -  the-------------------------------------------------------------------------------------------- * Second, uiapplication $ 1. IntroductionPanax Notoginseng 1>symbol of the entire application, an application on a UIApplication object, using a singleton design pattern - 2>Access this singleton object via [uiapplication sharedapplication] the  + 2. Common usage A 1>set the red hint number in the upper-right corner of the icon theApp.applicationiconbadgenumber =Ten; +  - 2>set the style of the status bar $App.statusbarstyle =Uistatusbarstyleblackopaque; $  - 3>control the display and hiding of the status bar -App.statusbarhidden =YES; the  - 4>Show the circle above the status barWuyiApp.networkactivityindicatorvisible =YES; the  - 5>Open External Resources Wu*Open Web page -[App Openurl:[nsurl urlwithstring:@"http://www.baidu.com"]]; About  $*Call -[App Openurl:[nsurl urlwithstring:@"tel://10086"]]; -  -*Send SMS A[App Openurl:[nsurl urlwithstring:@"sms://10086"]]; +  the 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<UIApplicationDelegate>Delegate; $  the-------------------------------------------------------------------------------------------- the three, the agent method of Uiapplicationdelegate the #pragmaThe Mark program is loaded (completed) and is called once the-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (Nsdictionary *) Launchoptions -  in #pragmaCalled when the mark application loses focus (an app cannot interact with the user if it loses focus) the- (void) Applicationwillresignactive: (UIApplication *) Application the  About #pragmaMark will be called when the program enters the background. the- (void) Applicationdidenterbackground: (UIApplication *) Application the  the #pragmaMark program is about to enter the foreground when the call +- (void) Applicationwillenterforeground: (UIApplication *) Application -  the #pragmaCalled when the mark application gets focus (an app can interact with the user only after the focus has been focused)Bayi- (void) Applicationdidbecomeactive: (UIApplication *) Application the  the #pragmaMark program may be called when it is about to be closed -- (void) Applicationwillterminate: (UIApplication *) Application -  the #pragmaThe mark program receives a memory warning called the- (void) Applicationdidreceivememorywarning: (uiapplication *) application

iOS project Common Files, uiapplication and Uiapplicationdelegate proxy methods

Related Article

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.