title: How to create a method which accepts strings with format directly as argument?
body: <p>I don't know exactly how to put this question. 
  I want to create a method like <code>stringWithFormat:</code> or <code>predicateWithFormat:</code>, i.e. my method accepts argument directly as a string with format specifiers. How can I achieve this?</p>
  
  <p><strong>E.g.,</strong></p>
  
  <pre><code>-(void) someMethod: (NSString *)str, format; 
  </code></pre>
  
  <p>So that I can later call it like:</p>
  
  <pre><code>[someObject someMethod:@"String with format %@",anotherString];
  </code></pre>
  
  <p><em>This is not in relation to any particular context.</em> </p>
  
  <p>I was working <code>predicateWithFormat</code> with a code similar to:</p>
  
  <pre><code>NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name like myName"];
  </code></pre>
  
  <p>This didn't work, but:</p>
  
  <pre><code>NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name like 'myName'"];
  </code></pre>
  
  <p>worked similar to:</p>
  
  <pre><code>NSString *str = @"myName";
  NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name like %@",str];
  </code></pre>
  
  <p>So this means the method is able to understand if the argument given has format specifiers used inside them. I'm curious how can this be done?</p>