As far as I understand Objective C / iOS is very dynamic language, so is it as dynamic as Ruby ? Does it have the equivalent of method_missing ? I asked the same question for js Does Javascript have something like Ruby's method_missing feature? and was disappointed that js does not support it yet.
Share
Objective-C is dynamic, although having been a Ruby programmer, I would say it is not quite as dynamic as Ruby.
Objective-C does have an equivalent of method_missing. You’ll want to override both
forwardInvocation:andmethodSignatureForSelector:and follow this important advice from Apple:Don’t use
doesNotRecognizeSelector:as Apple warns thatit must always result in an exception being thrown.Please see the NSObject class documentation for further details: http://developer.apple.com/library/ios/#DOCUMENTATION/Cocoa/Reference/Foundation/Classes/NSObject_Class/Reference/Reference.html