1. The iphone development environment is best performed on mac OS, but mac OS is built on Free BSD + OpenStep. * It is easy to build a development environment on inux, however, XCode development without mac OS is more difficult.
2. The development language used by the iphone is Obective-C, which is almost fully compatible with the C syntax (not C ++ ).
3. Although the root class can be defined at will, NSObject is generally used as the root class.
4. Added ObjectC content:
@ Interface... @ end class definition,
@ Implementation... @ end class implementation,
@ Class predeclaration,
@ Property and @ synthesize synthesis Declaration (similar to setter and getter ),
[] Class call. objectC is called message sending. The first position is the message receiving object.
# Import instead # include
Self object itself
Super parent class
5. How to instantiate an object [[NSAID utoreleasepool alloc] init];
It consists of two steps: One alloc request memory, init initialization object.
It can be replaced by [NSAID utoreleasepool new], but it is not recommended.
[** Drain]
6. ObjectC only uses pointers to represent an object.
7. The id data type can be considered as an Object similar to the. NET encapsulation operation. The Compiler determines the conversion from everything to other types. Id is a common pointer type.
8. Use @ try, @ catch, @ finally, and @ throw to handle exceptions.
9. variable scope control @ public, @ private, @ protected, @ package
10. Adding @ to the string is a constant string object.