iOS Learning HelloWorld Project

Source: Internet
Author: User

This article is intended for readers, and the main introduction is to use Xcode to create a "HelloWorld" project.

1. Open Xcode and click New Project

Select project Type

2. Fill in the project information

3. Introduction to the Code

////main.m//HelloWorld////Created by Dengwei on 16/2/4.//Copyright (c) 2016 Dengwei. All rights reserved.////objective-c using #import to import a header file, the difference from # include is that the same header file will not be imported repeatedly#import<Foundation/Foundation.h>intMainintargcConst Char*argv[]) {    //Create an auto-free pool@autoreleasepool {//Insert code here ...//put "Hello world!        "Strings are printed to the console and are automatically wrapped when printed. //The string in objective-c language is denoted by @ "". //The NS begins with Objective-c's naming habit, which is related to the next SETP company that Steve Jobs founded. //%@ Printing a String objectNSLog (@"Hello, world!."); //types commonly used in Objective-cNsinteger i =Ten; //Boolean typeBOOL Flaga = YES;//NOBOOL FLAGB = TRUE;//FALSE//objective-c string (not of base type, object type, pointer)NSString *str =@"Dengwei"; //structure that represents a range//The first parameter is the start position//The second parameter is the length of the rangeNsrange rang = {1,3}; Nsmakerange (1,3);//equivalent to the previous line of code            }    return 0;}

4. Effect Demo

iOS Learning HelloWorld 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.