标签:style color 使用 sp on bs 代码 tt size
@property是让编译器自动产生函数申明
不再写下面2行代码
-(void) setAge:(int)newAge;
-(void) age;
只需要下列一行就可以代替
@property int age;
@synthesize 意思是合成
@synthesize就是编译器自动实现getter和setter函数
不用写下列代码
- (void) setAge:(int)newAge
{
age=newAge;
}
-(int) age
{
return age;
}
只需要些
@synthesize age;
标签:style color 使用 sp on bs 代码 tt size
原文地址:http://www.cnblogs.com/penger/p/4151787.html