title: @objc' can only be applied to an extension of a class , calling extension method from swift to objective c
body: <p>I am creating string extension like </p>
  
  <pre><code>@objc extension String {
  static func className(_ aClass: AnyClass) -&gt; String {
      return NSStringFromClass(aClass).components(separatedBy: ".").last!
  }
      func localize() -&gt; String
  {
      return NSLocalizedString(self, comment: "")
  }}
  </code></pre>
  
  <p>I am using this in swift like </p>
  
  <pre><code>btnReferencePhoto.setTitle("ADD REFERENCE PHOTO".localize(), for: .normal)
  </code></pre>
  
  <p>I want to use it in objective c 
  but I am able to access localize method in objective c file 
  for that I add @objc  in string extension, but it is giving error </p>
  
  <p><a href="https://i.stack.imgur.com/iKdZr.png" rel="noreferrer"><img src="https://i.stack.imgur.com/iKdZr.png" alt="enter image description here"></a></p>
  
  <p>I also tried </p>
  
  <p><a href="https://i.stack.imgur.com/z38ti.png" rel="noreferrer"><img src="https://i.stack.imgur.com/z38ti.png" alt="enter image description here"></a></p>