Lan Yi IOS Practice Day 2

Source: Internet
Author: User

Today is schoolboys's second practice day, is the first two days of consolidation and practice, the two days of the content of the concept of something more, there is a lot of content to listen to the indefinitely, class, and neglect review review, so it is in the summary of today some knowledge although only two days, but has forgotten most of the content, To find out their own difficulties, so I decided to later regardless of the content of the story, the same night self-study must start from scratch, the content of the review to write again.

These two days are as follows: 1, object-oriented, the object has a property and method composition, each attribute is equal to a global variable and two methods, the invocation of the method: [Object Method Name] 2, Class, class method (static method) with the + number begins, cannot invoke the resulting method property is self, the invocation of the class method is [class name Method name] 3, Factory Method: Factory method is one of the class methods, the factory method is used for the production of objects, so there must be a return value and the return value of the object; 4. Initialization method: No matter what method can take parameters and return values,The initialization of some of the content needs to be changed with the parameter variables, so that each generation of the object name and age have to call simultaneous incoming name and age decision;5, Inheritance: The subclass of some similar behavior with a parent class to initialize these properties and methods, the sub-class in a different place with a global variable, in the subclass of these global variables to replicate, so that you can produce a lot of different sub-classes!

Lan Yi IOS Practice Day 2

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.