OBJECTIVE-C Naming conventions

Source: Internet
Author: User

Http://www.tuicool.com/articles/ERvUbmR

1. If the return value of the method is newly created, the first word of the method name should be the return value type, unless there is a modifier such as localizedstring;

2. The noun representing the parameter type should be placed before the parameter.

+localizedstringwithformat:  // localized string

3. Do not use the abbreviation STR, should use the full name of the full string.

The 4.Boolean attribute should be prefixed with the IS. If a method returns a non-attribute Boolean value, the has or is current prefix should be selected according to its function.

- isequaltostring; -Hasprefix;
Code Reviews
Insertobject:atindex: Good
Insert:at: not clear; At "What does the table show?
Removeobjectatindex: Good
Removeobject: That's right, because the law is? To remove an object as a parameter
Remove not clear; What to remove?

OBJECTIVE-C Naming conventions

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.