The choice of # define and static for the IOS face question

Source: Internet
Author: User

The interview in the first few days of a problem, remember it is written out. This problem, not an iOS face test, should be regarded as the basis.

What are the usual ways to define constants when writing code?

I only think of the # define XX XXX because commonly used

======================================================

Fortunately I have the habit of buying books every month, recommend a book "effective objective-c 2.0: Writing high-quality iOS and OS 52 Effective methods of x code . This is described in section Fourth of the first chapter of this book.


The following is a link to this article:

Multi-use type constants, less # define preprocessing directives

Http://book.51cto.com/art/201403/432132.htm


The choice of # define and static for the IOS face question

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.