<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                直接看代碼吧 Dog.h ~~~ #import <Foundation/Foundation.h> @interface Dog : NSObject @property(nonatomic, strong) NSString * dogName; @property(nonatomic, assign) NSInteger dogAge; @end ~~~ Dog.m ~~~ #import "Dog.h" @interface Dog () @property(nonatomic, strong) NSString * dogSex; @end @implementation Dog - (instancetype)init { self = [super init]; if (self) { self.dogName = @"dahuang"; self.dogAge = 2; } return self; } - (void) printDogName { NSLog(@"dogName"); } @end ~~~ 測試代碼: ~~~ #import "ViewController.h" #import <objc/runtime.h> #import <objc/message.h> #import "Person.h" #import "Dog.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. Dog * dog = [[Dog alloc] init]; unsigned int outCount = 0; unsigned int outCountMethod = 0; Ivar * ivars = class_copyIvarList([dog class], &outCount); Method * methods = class_copyMethodList([dog class], &outCountMethod); for (int i = 0; i<outCount; i++) { // 取出i位置對應的成員變量 Ivar ivar = ivars[i]; // 查看成員變量 const char *name = ivar_getName(ivar); NSLog(@"%s", name); } for (int j = 0; j < outCountMethod; j++) { Method method = methods[j]; SEL methodSEL = method_getName(method); const char * selName = sel_getName(methodSEL); if (methodSEL) { NSLog(@"sel------%s", selName); } } } ~~~ 輸出: ~~~ 2015-11-02 12:18:07.851 02-runtime[1970:51391] _dogName 2015-11-02 12:18:07.852 02-runtime[1970:51391] _dogAge 2015-11-02 12:18:07.853 02-runtime[1970:51391] _dogSex 2015-11-02 12:18:07.853 02-runtime[1970:51391] sel------setDogName: 2015-11-02 12:18:07.854 02-runtime[1970:51391] sel------setDogAge: 2015-11-02 12:18:07.855 02-runtime[1970:51391] sel------printDogName 2015-11-02 12:18:07.855 02-runtime[1970:51391] sel------dogName 2015-11-02 12:18:07.855 02-runtime[1970:51391] sel------dogAge 2015-11-02 12:18:07.856 02-runtime[1970:51391] sel------dogSex 2015-11-02 12:18:07.856 02-runtime[1970:51391] sel------setDogSex: 2015-11-02 12:18:07.856 02-runtime[1970:51391] sel------.cxx_destruct 2015-11-02 12:18:07.857 02-runtime[1970:51391] sel------init ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看