Objective-c class, instance member, static variable, object method, class method (static method), object,
First, the class
In iOS, the declaration of a class is separated from its implementation, that is, it
"Basic Concepts"
1. Key-value encoding is a mechanism for indirect access to object properties, which allows access to object properties without invoking access methods and variable instances.
2. The key-value coding method is declared in the OC
C language should start from the chatty, from the foundation. It belongs to the best. Don't be misled by it. It also has very many errors and is not suitable for standard software developers to use. Variable declarations, definitions, programming
Objective-c is similar to object-oriented languages such as C + +, Java, but in many ways different. If you use another object-oriented language, you can understand many of the paradigms and templates used by objective-c. However, the syntax may
Decorating mode is the ability to dynamically extend an object without having to change the original class file and use inheritance. It is by creating a wrapper object, that is, decorating to wrap the real object.For example, the game console has a
Synchronous
Asynchronous
Parallel
Serial
Task Group
Time to wait
There are two types of Dispatch queues:
1.Serial Dispatch queue, serial queue, can only perform one of the tasks that are appended to the thread at a
[Master Objective-c] Blocks (block)Reference book: "Proficient objective-c" "Beauty" Keith LeeDirectory
Proficient in block objective-c
Directory
Syntax for blocks
The lexical range of a block
Memory management
Auto Free Pool
is a semi-automatic memory management methodAutorealease Method:-(Instancetype) autoreleaseThis method places the object in the auto-free pool, and all objects in the pool are destroyed when the pool is automatically freed.Common
The copies between objects in the objective-c are divided into shallow and deep copies. Plainly, a shallow copy of a non-container class is the address of the copied object, and the contents of the object are still a copy, and no new memory is
1. Property
Basic use----the compiler will automatically generate a declaration of a property's Getter/setter method whenever it sees @property
2. @synthesize
@synthesize is a compiler directive that simplifies the
Uiscrollview Controls and Uipagecontrol controls: Uiscrollview is used to display more than one screen, content that goes beyond the screen can be viewed by swiping, and of course Uipagecontrol can be paged. Uiscrollview tend to be used with
Objective-c Sunflower Treasure Book First Heavy (internal)--Class and objectTransferred from: http://husbandman.diandian.com/post/2012-08-17/40036035008Objective-c Sunflower Treasure Book First Heavy (internal) – Classes and objectsRemember: To
. h declaration File1 //Integer.h2 //02-MRC3 //4 //Created by Ma C on 15/8/13.5 //Copyright (c) 2015 BJSXT. All rights reserved.6 //7 8 #import9 Ten @interfaceInteger:nsobject One @property (nonatomic,assign) Nsinteger i; A-(ID) Initwithi:
Create the header file (. h) and export the constants:// Constants.hNSString *constNSString *const MySecondConstant;//etc.(You can use extern instead of Foundation_export when the code is not used for mixed-C + + programming.)Define the source file (
Initialization convenience initialization and specifying initialization convenience initialization mode convenient initialization mode one-(id) initWithFormat:(NSString *) format,...;
Initializes a new string as the result of the
With regard to the property of Objective-c, many novice iOS developers will be confused, including experienced iOS development programmers,Because Objective-c's property, say much, say less but also a lot, from MRR (Manual Retain Release) to Arc
Prior to learning C + +, or Java, there was a visibility issue, and this article discussed the visibility of declared member variables on object methods (minus methods) and class methods (plus methods).(a) Code one: member variables are visible to
More recent time, want to learn iOS development, after a multi-study or decided to learn from OC, from the basic OC grammar slowly toward the cocoa framework of learning.OC's Introductory language I I choose the most new version of the OBJECTIVE-C
Let's take a look at the main definitions of NSObject as follows (including some of my understanding comments):@interface nsobject {Class isa objc_isa_availability;} /* Initializing a class *//** * @author arbboter, 15-01-15 22:01:47 * * If the
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