Class and Object de differences in iOS

Source: Internet
Author: User

Concepts of classes and objects

A class is an abstraction of the same kind of thing, which defines the static attributes (attributes) and dynamic properties (methods) that such an object should have.

An object is an instance of a class and is a concrete thing.

Classes and objects are abstract and concrete relationships.

A class is actually a data type, and its variables are objects.

Relationship between class and class--inheritance relationship

A is B

If this is the case, in the design process can be regarded as an inheritance relationship.

For example: Students and primary school pupils are also students, so students are the parents of pupils, pupils are children of the class.

OC and Object-oriented

The object is the core of the OC program. "Everything is Object" is the core idea in the procedure.

Class and Object de differences in iOS

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.