Cocoa supports something call Selectors
// SEL is a type
// Here we create an instance of sell representing 'someMethod'
SEL sel = @selector(someMethod:)
// See if some object responds to this
if ( [obj respondsToSelector:sel] ) {
// Now invoke the selector (the method, if you will)
[obj performSelector:sel withObject:self]
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment