# Include is used in C/C ++ to include the header file. The disadvantage is that the same header file may be contained multiple times.# Import is used in OC to include the header file. The advantage is that the same header file can only be contained
In C ++, we can implement more inheritance.CodeReuse and EncapsulationProgramMore concise. In objective-C, only single inheritance is allowed, and no multi-inheritance is allowed. In addition to the Protocol protocol, we can implement a method
In the foundation framework, a set of Single-value objects is provided, and the elements in the nsset instance are unordered. Only one object can be saved, similar to the hashset in Java. Java and OC are too similar.
1. Continue to be immutable,
Arrays in OC are quite different from those in C, C ++, or Java.
Arrays in foundation are a set of ordered objects. arrays cannot store basic data types, but can only store class instances (objects ), to store basic data types and struct in an array,
Object archiving refers to writing an object into a file and saving it on the hard disk. When the program is blocked again, these objects can be restored. Object archiving is also called object serialization or object persistence.
Persistent storage
Magwin Method
1. Install the Compiler
There are many objective-C compilers. llvm is developed from GCC and is mainly used on Apple's platform. GNU can use gnustep.C program.Go to the download page and download the above three software packages for
Recently I learned objective-C. For Beginners, is it not a habit to add things in it? Is it strange to @ property @ synthesize? After all, there is no such "mess" in C !!
First, let's introduce this command @ property.
This "mess" is actually a
How can I add instance variables to all objects? You can use category to easily add methods to existing classes, but you cannot directly add instance variables. (If you use the look-up table method, you can save your money ). However, since Mac OS X
Some time ago, I participated in an objective-C project using the C ++ library. I wrote an article about mixed editing, but the result was unexpectedly one of the top results about objective-C ++ in Google search.
Later, Apple uses clang Based on
In IOS apps, if you want to save big object data, you can use XML files or attribute files. However, because the plain text method is not confidential enough, for example, you can encapsulate the stored data as an instance of a custom class and save
Document directory
Ii. What is objective-C?
3. Other things
Iv. Objective-C 2.0
V. Summary
Most beginners who have a basic development experience on other platforms are eager to see xcode. After seeing the interface builder, they are eager
Chapter 4 source file organizationAll the projects we have discussed so far put all the source code into the main. M file. The main () function of the class, @ interface and @ implementation are all inserted into the same file. This structure is no
The memory leakage problem in objective-C program development is a headache for beginners. It may be that the C # language is too used to automatic spam release, I used the profile tool in xcode to check the small program I wrote, and the memory
Apple expands block syntax in C, objective-C, and C ++ and supports it in gcc4.2. Now we can use it in MAC 10.6 and iOS 4. For Mac 10.6 or IOS 4.0 platforms, it is said that blocksyntax can be supported using http://code.google.com/p/plblocks.
The
Many beginners are confused about nil, nil, null, nsnull, and [nsnull null! First, use the online explanation:
Nil: a null pointer to an objective-C object. pointer.
Nil: a null pointer to an objective-C class. pointer.
Null: a null pointer to
What are the strings in objective-C syntax?
If the original Yusong Momo article is reprinted, please note: It is reprinted to my independent domain name blogYusong Momo program Research Institute, Original address: http://www.xuanyusong.com/archives/
Objective-C syntax for object objects
If the original Yusong Momo article is reprinted, please note: It is reprinted to my independent domain name blogYusong Momo program Research Institute, Original address: http://www.xuanyusong.com/archives/401
Static keywords in objective-C syntax
If the original Yusong Momo article is reprinted, please note: It is reprinted to my independent domain name blogYusong Momo program Research Institute
, Original address: http://www.xuanyusong.com/archives/4
Based on the experience of many netizens and the experience of iOS development, the author summarizes the iOS development technology for later users to learn, I also hope that I can gain a deep understanding of iOS development.
1. Sources of
Anyone familiar with OC syntax may understand this: In oC, the member variables or methods of classes are not absolutely private.
Private methods cannot be accessed directly through class instances, but they can be accessed through the OC's
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.