OBJECTI-C basic knowledge of facing objects

Source: Internet
Author: User

The basics of Facing objects

control+p Previous Line Control+n Next line Control+a First Position Control+e at the end of the line control+d Delete cursor to the right   // First point get, second point set method cell. Textlabel . text called the set method;//_array did not call theSelf.array non-atomic nature nonatomic multi -threaded, fast speed Atomic Nature Atomic Default, multithreaded security  Read/write readwrite default setter,getter method Read-only readonly only getter method,   Set method Assign is allocated on the stack, managed by the system. Basic Data types Copy copies a new address for the string retain address unchanged, content change general Object  //assign -(void) setage: ( int) Age { _age = Age ; }//retain -(void) SetArray: ( nsarray *) array { if (_array! = array) {          [ _array release // release old value _array = [array retain]; //array back up a copy     }}//copy -(void) setName: ( nsstring *) name { if (_name! = name) { [ _name release ]; _name = [name copy];     }}Device Screen resolutioniphone:320x480iphone4:640x960ipad:768x1024 object: Is a real instance of a classpointers are typed, objects have types, the type of the object to which the pointer is pointing, and the type of the pointer is not relatedbase type stored value, pointer type save address"[]" must be called methodThe Alloc produces an object that, within it, allocates a memory space to the class name, pointing to the space with the object name @class tell the compiler not to compile in my . h file , I just use the following class name   @property is shorthand for the method declaration @synthesize is shorthand for " Implementation of the method "

1. Some terms that face the object:

(1). Class: A struct that can be instantiated as an object, representing an object type.

(2). Object, instance: a struct that contains a value and a hidden pointer to its class.

(3). Message: An action that an object can perform to inform the object what to do. Method calls are made in the form of [object Methods (Operations)], also known as "sending messages."

(4). Method: Code executed by the corresponding message

(5). Interface: A feature description provided by the class for an object.

(6). Implementation: The code that the interface executes.

(7). ID: Generic, representing any type of object.

(8). Superclass, parent class, Super: Inherited class.

(9). Subclass, Child class: The class that executes the inheritance.

OBJECTI-C basic knowledge of facing objects

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.