Objective-C quantity type-objective-c id data type

Source: Internet
Author: User

ID data typeAny type of objects can be stored. In a sense, it is a common object type. For example,ProgramLine

ID number; Declare number ID type. You can declare a method to make it return values of the ID type, as follows: -(ID) newobject: (INT) type; This program line declares an instance method named newobject, which has a single integer parameter named type and a return value of ID type. It should be noted that for the return value and parameter type declaration, IDYes Default. Therefore, the following program lines: + Allocinit; Declares a response ID type. ID typeIt is a very important data type in objective-C. It is the basis of polymorphism and dynamic binding, which will be frequently used in future Apple development.
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.