IOS (vi) Category categories

Source: Internet
Author: User
A Category

Category: Category (class, category) (OC)

Name: The original class + category name (the original class name is automatically generated, just write the following category name, usually the module name.) such as the original class person, new classification Ct,person+ct)

The role of classification: without changing the contents of the original class, you can add some methods to our class.

Attention:

1. Classification can only add methods and cannot increase member variables.

2. In the implementation of the classification method, the member variables in the original class can be accessed.

3. Classifications can override methods of the original class. However, the methods that overwrite the original class (the method of overriding the original class are not generally categorized).

4. Call Priority: Classification Precedence (The last class that participates in compilation is called first).

OC is a weak grammar.

IOS (vi) Category categories

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.