quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

NSScreencast Episode #38 Class Introspection

Class Introspection - NSScreencast

  • resignFirstResponder
  • Class class =
  • [self inspectClass:class]
    • add @property methods
    • self.methods = [self methodsInClass:class]
  • import 'objc/runtime.h'

  • SEL selector = method_getname(method)
    • NSStringFromSelector
    • [methodNames addObject:name]
  • Show method names on table view
  • NSArray ivars
    • ivarsInClass:class
      • class_copyIvarList(class, &ivarCount)
    • const char ivarNameStr = ivar_getname(ivar)
      • NSString stringWithCString encoding
  • numberOfRowsInSection
  • numberOfSectionsInTableView
    • switch (indexPath.section)
  • titleForHeaderInSection

iOS Recipes