title: Objective-C 2.0: class_copyPropertyList(), how to list properties from categories
body: <p>I tried to list all properties of an Objective-C class like described in the <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html" rel="noreferrer">Objective-C 2.0 Runtime Programming Guide</a>:</p>
  
  <pre><code>id LenderClass = objc_getClass("UIView");
  unsigned int outCount, i;
  objc_property_t *properties = class_copyPropertyList(LenderClass, &amp;outCount);
  for (i = 0; i &lt; outCount; i++) {
      objc_property_t property = properties[i];
      fprintf(stdout, "%s %s\n", property_getName(property), property_getAttributes(property));
  }
  </code></pre>
  
  <p>But this lists only three properties:</p>
  
  <pre><code>userInteractionEnabled Tc,GisUserInteractionEnabled
  layer T@"CALayer",R,&amp;,V_layer
  tag Ti,V_tag
  </code></pre>
  
  <p>Looking at the header file for UIView.h those are the three properties directly declared in the class. The other UIView properties are added through categories.</p>
  
  <p>How do I get all properties of a class, including those coming from categories?</p>
  
  <p>I tried this with the iPhone simulator (iPhone SDK 2.2.1), btw. (in case this is important).</p>