Inheritance error (OC)

Source: Internet
Author: User


Inheritance: when multiple classes share the same instance variables and methods, you must consider using inheritance.

Use of inheritance: write multiple identical instance variables and methods into a common parent class



Error cause: the current system version is earlier than the system version of the project to be created


Change this to a version lower than your current version.





Error: duplicate instance variables
Solution: delete instance variables



Loop import problems

Unknown type name "woman"
Unrecognized type woman
Import # The import header file will assign a value to the content in the header file. When woman is used, the class is not defined, so it cannot be identified. A typical cyclic Import

This class cannot be used as a class. in the H file, use @ class woman; to declare woman as a string and then use it. However, it does not have content in the class. import # import "woman" to the M file"



Error: Repeated Import

Solution: Change the header file (. h file) to @ Class "woman", and import the # import "woman" file in the. M file (implementation file ).



Inheritance error (OC)

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.