摘要:
oc类中实现属性有两种方法,一种是使用OC自定义的格式来实现类的属性,另一种是手动实现类的属性,本篇文章就是章节如何通过自定义的方式实现类的属性效果:定义一个student类,具体的代码如下所示://student.h#import <Foundation/Foundation.h>@interface student : NSObject{ int Age; NSString *Name;}-(void)setAge:(int)_age;-(void)setName:(NSString *)_name;-(int)Age;-(NSString *)Name;@end//stude 阅读全文
posted @ 2011-07-05 22:05 星尘的天空 阅读(186) 评论(0) 推荐(0)