How do I list all fields of an object in Objective-C?

后端 未结 3 2003
说谎
说谎 2020-12-03 02:47

If I have a class, how can I list all its instance variable names?

eg:

@interface MyClass : NSObject {
    int myInt;
    NSString* myString;
    NSM         


        
3条回答
  •  萌比男神i
    2020-12-03 03:49

    Consider gen_bridge_metadata, which is intended for a completely different purpose, but can produce XML files from Objective-C header files.

提交回复
热议问题