Basic thing: Objective-C type and constant

Source: Internet
Author: User

Several data types in objective-C are not the same as those in C. It is hereby recorded.

-ID is a pointer type that can point to any type of object.

-Bool is the same as char, but it is used as a Boolean value.

Yes indicates 1

No indicates 0

-Iboutlet is a macro without any meaning and can be ignored. When interface builder reads class definitions from. H files, this macro will prompt them.

-The ibaction and void are the same. They are only used as prompts for interface builder.

-Nil is the same as null. We use nil instead of null because we use it to indicate that the object pointer is null.

 

In addition

# Import is the same as # include, but # import ensures that the Referenced File is referenced only once.

From: http://www.cocoachina.com/newbie/basic/2009/0611/50.html

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.