在IOS开发中,属性名为id的处理方法

在.h 文件中定义属性名为id

{ 
int _id; 
} 
@property (nonatomic, assign) int id; 

在.m 文件中用synthesize声明该属性,会自动生成get和set方法

@synthesize id = _id;

 

posted @ 2016-01-12 15:32  ha_cjy  阅读(1102)  评论(0编辑  收藏  举报