Class is the core of objective-C, and objective-CProgramAll are performed around classes. The objective-C program consists of at least three parts:
1. Class interface: defines the class data and methods, but does not include the implementation of
A framework is a software package that contains multiple classes.
Mac operations provide dozens of frameworks to help us quickly develop applications on MAC systems.Program.In these frameworks, there are some basic frameworks, including: string
1. Category)
The classification in object-C is a compilation method that allows us to expand a class by adding a method (but new instance variables cannot be added through category ), and we do not needCodeThis is similar to defining attributes
in objective-C, the real implementation of message and method is bound in the execution phase, rather than the compilation phase. The compiler converts the message to the call of the objc_msgsend method. the objc_msgsend method contains two
The difference between the two is:
1. import will contain all information about this class, including entity variables and methods, while @ class only tells the compiler that the name declared after it is the name of the class. As for how these
Why is Stella SDK used?
Now cross-platform development tools more and more, such as the use of HTML5 phone gap, such as a name of the king proposed Cocos2d-x, there are many, these platforms can directly develop iOS and Android applications, but
Reproduced in: http://www.cnblogs.com/54007/archive/2011/02/11/1951355.html
In C #, we use interfaces to implement polymorphism. For example, the interface iob defines a method F. There are two classes A and B that implement the IOB interface.
Iob
Nowadays, iPhone development is getting increasingly popular, and I am also eager to learn about objective-C. However, the company is a clear Windows XP system (not a sound picture of the company's machine) (^_^) and cannot learn and debug it. One
In: argument is an input argument only and won't be referenced later
Out: argument is an output argument only, used to return a value by reference
Inout: argument is both an input and output argument
Const: The (pointer) argument is constant
In addition to category, objective-C has an associative extension mechanism.
Category is common and serves to extend some new methods to existing classes.
So associative is something that category cannot do, and attributes can be extended.
Official
In the previous article, I briefly introduced how to implement delegation.In the location framework, the delegate and protocol are used together to implement decoupling and flexibility between objects. Now, based on the previous code, a new protocol
After using objective-C language for iOS development for a period of time, I found my language base was relatively weak and began to make up for my shortcomings. I found that after using a language, I can look back at many of its principles to find
Address: http://howtomakeiphoneapps.com/2009/05/for-and-foreach-loops-in-objective-c/
Loops are the gears of programming: they make your code take action.
The two loops I use most often is the For Loop (to do a predefined number of steps) and
Http://unmi.cc/objective-c-dp-singletonObjective-C design pattern Singleton
2011-08-25-Unmi
As the simplest one in the design mode, the singleton mode is still used in many systems. There are always some instances that only need one of them from the
1. Class Declaration
1-1 @ interface start and @ end
1-2 variables and methods cannot be mixed together, and instance variables must be placed in {}
1-3 no static or const instance variables. In the. M file, you can declare the static property: it
Recently, in the program, you need to declare a one-dimensional array in the C language in the objective-C class:
@interface CArrayTest : NSObject{@private BOOL testArray[4]; }@end
Declare attributes
@property(nonatomic,assign)BOOL testArray[4
1. Simple replication can only implement shallow copy: assign values to the pointer, so that the two pointers point to the same memory space, and the operation is not safe.
2. The foundation class complies with the and protocols to implement the
Several data types in objective-C are not the same as those in C. It is hereby recorded.
-ID is a pointer type that can point to any type of object.
-Bool is the same as char, but it is used as a Boolean value.
Yes indicates 1
No indicates
I recently started to learn about iPhone development. Turing's basic objective-C tutorial is a good Getting Started Guide Book. Some minor problems are found during the learning process. Although it is not critical, it is helpful for developers
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