1.anonymous obj
scene: we just invoke a obj's method once
2.self
self in oc ~ this in Java
a subject in a obj method A which is ahead of "self" invoke method B
the self here is a obj who invokes method
so as in a class method:
we invoke a class method A in class method B,we add self when we do
3.override
class A : class B
how to rewirite a method in class A,don't declare ,just write a method with a same name.
4.extends
we invoke a method in A class, we look for it in the Father classes one by one,until the NSObjectw.
we can not only use the member_vars & obj methods in Father calss,but also the Class method
we can also rewrite the class method
we can't call the member_vars which is tagged private
5.private, protected,public
the same as in Java except @package
6.SPECIAL
we usualy create a var in .h file
but if we create a var in .m file,it is default private
7.polymorphic
polymorphic in oc ~ polymorphic in Java
the Father Indicator --> Son Indicator
8.description
%@ will rewrite the description method
-----------before Xcode 4.4-----------
9.@property
in android,right click and build the getter/setter method
in oc,we use @property in Interface
10.@synthesize
@synthesize in Implements
synthesize var = _var
if we just write synthesize var, it will create a member_var automatically
-----------before Xcode 4.4-----------
11.@property
we write @property in Interface,and we can also cover the method in Implements
but we should add (nonatomic)
if u cover the setter & getter method at the same time,u have to create a member_var yourself
@property (readonly):remain the getter one method
12.id
a universal indicator
13.private mehtod
if we write a method in .m,don't declare it in .h,it is private method
Sum:
Null