Rubyist Objective-C
• • • @flexfrank
LT2
rubyist mac/iphone/ ipad
macruby0.6
Objective-C/Cocoa
Ruby
Rubyist
Object#send
• - (id)performSelector:(SEL)aSelector • - (id)performSelector:(SEL)aSelector withObject:(id)anObject • - (id)performSelector:(SEL)aSelector withObject:(id)anObject withObject: (id)anotherObject
• - (IMP)methodForSelector:(SEL)aSelector
Object#renpond_to?
• - (BOOL)respondsToSelector:(SEL)aSelector
Object#method_missing
• 1. - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector • 2. - (void)forwardInvocation:(NSInvocation *)anInvocation
open class
ClassName(CategoryName)
Class#define_method
IMP class_replaceMethod(Class cls, SEL name, IMP imp, const char *types)
• instance_variable_get • Ivar object_setInstanceVariable(id obj, const char *name, void *value) • instance_variable_set • Ivar object_setInstanceVariable(id obj, const char *name, void *value)
• Class#instance_methods • Method * class_copyMethodList(Class cls, unsigned int *outCount) • instance_variables: • Ivar * class_copyIvarList(Class cls, unsigned int *outCount)
Objective-C
Rubyist
Rubyist Objective-C

RubyistのためのObjective-C入門