1.@property与@synthesize配对使用。 @property预编译指令的作用是自动声明属性的setter和getter方法。 @synthesize 创建了该属性的访问代码 功能:让编译好器自动编写一个与数据成员同名的方法声明来省去读写方法的声明。2.强引用(__strong)和 弱... Read More
posted @ 2015-10-28 19:04 星语海蓝 Views(1290) Comments(0) Diggs(0) Edit
#synthesize关键字: 根据@property设置,自动生成成员变量相应的存取方法,从而可以使用点操作符来方便的存取该成员变量 。@implementation 关键字,表明类的实现 @end 结束self 关键字 :类似于java中的this,是隐藏参数,指向当前调用方法的类。super ... Read More
posted @ 2015-10-28 11:33 星语海蓝 Views(280) Comments(0) Diggs(0) Edit