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

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

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

@synthesize id = _id;

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
猜你喜欢
  • 2022-01-22
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
相关资源
相似解决方案