我们在编程过程中,如果使用到了runtime(运行时),我们几乎都是想动态的改变这个类的信息,包括方法,属性,balabala的,并且获得这个类的一些信息,等等,下面我们就来看看怎么通过runtime提供的方法,来达到这些目的
1). 获取 这个类的所有属性

1 .h 文件
2 
3 @interface RTObj :NSObject
4 @property(nonatomic,copy)NSString*name;
5 @property(nonatomic,copy)NSString*webUrl;
6 @property(nonatomic,copy)NSString*imageUrl;
7 @property(nonatomic,copy)NSString*type;
8 -(void)sort;
9 @end
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2021-11-19
  • 2022-12-23
猜你喜欢
  • 2021-12-09
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2022-02-22
  • 2021-07-25
  • 2022-12-23
相关资源
相似解决方案