iOS grows daily once (Day 1)

Source: Internet
Author: User

Hello World begins.

There is no discussion of how to create a project import project. As a result of working time soy sauce So also do not talk about details, only the implementation of the specific project and the analysis of the key process, only for my actual use of conditions. No, please move.

First of all, talk about AppDelegate.h and APPDELEGATE.M files.

AppDelegate.h:

#import <UIKit/UIKit.h>@class bidviewcontroller;    // declaring a referenced file @interface Bidappdelegate:uiresponder <UIApplicationDelegate>   //  Implement the methods in the Uiapplicationdelegate protocol, Event       *window for handling uiapplication reception;    // UIView subclasses, is the root of all UIView, manages and coordinates the display of the application  *Viewcontroller; @end

APPDELEGATE.M:

#import "BIDAppDelegate.h"#import "BIDViewController.h"@implementationbidappdelegate-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (Nsdictionary *) launchoptions{Self.window= [[UIWindow alloc] initwithframe:[[uiscreen mainscreen] bounds];//Initialize UIWindow//Override point for customization after application launch.Self.viewcontroller = [[Bidviewcontroller alloc] Initwithnibname:@"Bidviewcontroller"Bundle:nil];//Initialize the Bidviewcontroller and specify the controller's Xib file, the Xib file is the layout fileSelf.window.rootViewController = Self.viewcontroller;//Specify window's root view controller[Self.window makekeyandvisible];//let window appear on the screen    returnYES;}- (void) Applicationwillresignactive: (UIApplication *) application{//Sent when the application are about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as a incoming phone call or SMS message) or when the US    Er quits the application and it begins the transition to the background state. //Use the This method to the pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.}- (void) Applicationdidenterbackground: (UIApplication *) application{//Use the method to release the shared resources, save user data, invalidate timers, and store enough application state in     Formation to the restore your application to the it is terminated later. //If Your application supports background execution, this method is called instead of Applicationwillterminate:when th E user quits.}- (void) Applicationwillenterforeground: (UIApplication *) application{//Called as part of the transition from the background to the inactive state; Here you can undo many of the changes mad E on entering the background.}- (void) Applicationdidbecomeactive: (UIApplication *) application{//Restart Any tasks this were paused (or not yet started) while the application is inactive. If the application is previously in the background, optionally refresh the user interface.}- (void) Applicationwillterminate: (UIApplication *) application{//Called when the application are about to terminate. Save data if appropriate. See also Applicationdidenterbackground:.}@end

Because it is Hello World, Bidviewcontroller also has nothing, just a simple text, so do not move, so the beginning of the first iOS has ended.

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.