title: Objective-C: Calling selectors with multiple arguments
body: <p>In MyClass.m, I've defined</p>
  
  <pre><code>- (void) myTest: (NSString *) withAString{
      NSLog(@"hi, %@", withAString);
  }
  </code></pre>
  
  <p>and the appropriate declaration in MyClass.h . Later I want to call</p>
  
  <pre><code>[self performSelector:@selector(mytest:withAString:) withObject: mystring];
  </code></pre>
  
  <p>in MyClass.m but I get an error similar to
  <strong>* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*</strong> -[MyClass myTest:withAtring:]: unrecognized selector sent to instance 0xe421f0'</p>
  
  <p>I tried a simpler case with a selector that took no arguments that printed a string to console and that worked just fine. What's wrong with the code and how can I fix it? Thanks.</p>