1.Creating Objects
有时候class creator和init method同时存在
Class creator method:[NSString stringWithFormat:...]
Init method:[NSString alloc] init]
苹果公司倾向使用后者
2.you can ask other Objects to create new object s for you
3.but not all Objects given out by other Objects are newly created
4.Sending messages to nil is mostly OK.
5.all object pointers are treated like id at runtime.
Dynamic binding:
6.Static typing
7.never use id *
8.casting
9.Introspection内省
10.Protocols
Does not specify the class of an object pointed to, but does specify what methods it implements.
In between id and static typing
网友评论