实例变量:实例后才能使用的方法☆类方法id : 对象类型(只要继承NSObject 的类型,都可以使用)+ (void)sum:(int)num1 andNum2:(int)num2;☆实例方法类方法和实例方法唯一区别是调用者不同无论是 类方法 还是 实例方法[receirver message]; 消息机制---------给 receiver 发送了一个message 消息oc 多参//方法名称:(int)setScore:(float)score;(void)setScore:(int)score;方法名相同setName:sex:age://初始化方法//只调用一次 在创建对象的时候调 Read More
posted @ 2013-11-05 20:48 lanacon Views(189) Comments(0) Diggs(0) Edit
Local delaration of '*****' hides instance variable 就是 汽车 铅笔 都有品牌、型号,如果想集成的话,可以再创建一个类,这个类里面写两个公共的部分继承继承相当于把父类代码(声明,实现) 拷贝到了子类中 Read More
posted @ 2013-11-05 10:29 lanacon Views(176) Comments(0) Diggs(0) Edit