Objective-C learning Summary

Source: Internet
Author: User

1 objective-C: variable and indirect.

Variables are indirect. By assigning a value to a variable, you only need to modify the value of the variable, instead of changing the appearance of the variable one by one.

Files are indirect. Mainly throughProgramIndirectly reads the data in the file and does not write the data into the program.

Pass hidden variables. For example, self-> fillcolor = C is also an indirect transfer.

2. Int main (INT argc, const char * argv []) Where argc is a command line parameter and the name of argv [0] storage program. Argv [1] stores the first parameter.

 

3. Oop experts: when calling a function, it is not called directly, but indirectly.

4. Procedural programming is built on functions.

5. The object isCode.

6. ID is a pointer and a generic type, which is equivalent to VaR in the C # function.

7. Send a message: the notification object performs some operation [sharp draw]

8. The object points to the function to be operated. For example, the circle object points to the circular area or the calculated area.

9. The object is the message target and needs to be queried to see what type it is. Circle browses its code to find the position of the draw function, and then executes the method of drawing the circle.

10. In objective-C, the method is special.

11. @ interface is used to pass the data members and features of the class to the compiler.

12. If you see the @ symbol in objective-C, you can regard it as an extension of C.

13. In objective-C, "-" indicates the declaration of the method.

14. When declaring implementation methods. For example, ":" In-(void) setcolor :( nsstring) S mainly informs the compiler and the programmer about the following parameters.

15. Use inheritance to avoid redundant code.

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.