title: how to transfer objective-c language (`va_list`,`va_start `,`va_end ` ) to swift language？
body: <p>This is my codes. they are objective-c language:</p>
  
  <pre><code>- (void)objcMethod:(NSString *)format, ...
  {
  va_list args;
  
  va_start(args, format);
  
  NSString *msg = [[NSString alloc] initWithFormat:format arguments:args];
  NSLog(@"%@", msg);
  
  va_end(args);
  
  va_start(args, format);
  
  va_end(args);
  }
  </code></pre>
  
  <p>how to transfer objective-c language (<code>va_list</code>,<code>va_start</code>,<code>va_end</code> ) to swift language？</p>
  
  <p>I also need to call this swift method in objective-c xxx.m file.</p>
  
  <p>Need help. thanks!</p>
  
  <p>======================================================================</p>
  
  <p>update: </p>
  
  <p>I tried MartinR's answer <a href="https://stackoverflow.com/questions/37993693/nslog-is-unavailable">NSLog is unavailable</a> , but something wrong, I can not add @objc in front of the method, need help.thanks.</p>
  
  <p><a href="https://i.stack.imgur.com/hCAeb.png" rel="nofollow noreferrer">my codes...</a></p>