iOS Development Primer (i): Creating a Project

Source: Internet
Author: User

Suddenly whim, want to write some technical aspects of things, did iOS also for several years, simply write an iOS development technology blog, I hope someone can use.

Start with the creation of a Hellow world project today.

One: First open Xcode and then click creat a new Xcode Project

Then select single View application and click Next

The product name here is the name of the project below two is the company's name and logo, can be modified according to their own circumstances, the following language after Xcode 6 began to support Swift here we choose Objective-c, Device is the target device we are developing, here we choose the iphone click Next and our project is built.

We can see the following interface

Here the role of the various documents I do not explain for the time being, we will slowly explain their role.

Two: Modify the code to complete our first application

Click on the viewcontroller.m file in the left file bar to find

1 -(void) viewdidload {2    [Super Viewdidload]; 3     // additional setup after loading the view, typically from a nib. 4 }

Add code becomes

- (void) viewdidload {[Super viewdidload];    [Self.view Setbackgroundcolor:[uicolor Blackcolor]; UILabel* Hellowoldlab = [[UILabel alloc]initwithframe:cgrectmake ( -, -, -, -)]; Hellowoldlab.text=@"Hello World"; Hellowoldlab.textcolor=[Uicolor Whitecolor]; Hellowoldlab.font= [Uifont fontwithname:@"Helvetica"Size -. f];        [Self.view Addsubview:hellowoldlab]; //additional setup after loading the view, typically from a nib.}

Then click the Run button in the top right corner

Take a look at the running results.

Congratulations, you've finished your first iphone app.

iOS Development Primer (i): Creating a Project

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.