title: Can we add @objc for swift function that returns optional value?
body: <p>I have a swift method like:</p>
  
  <p><code>public func xIndexAtPoint(point: CGPoint) -&gt; Int?</code></p>
  
  <p>I want to expose it to Objective-C runtime, so I add @objc before it.</p>
  
  <p><code>Method cannot be marked @objc because its result type cannot be represented in Objective-C</code></p>
  
  <p>I am not sure why optional value is not allowed, since Apple does not 
  mention it in <a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html" rel="nofollow">https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html</a></p>
  
  <p>You’ll have access to anything within a class or protocol that’s marked with the @objc attribute as long as it’s compatible with Objective-C. This excludes Swift-only features such as those listed here:</p>
  
  <pre><code>Generics
  
  Tuples
  
  Enumerations defined in Swift
  
  Structures defined in Swift
  
  Top-level functions defined in Swift
  
  Global variables defined in Swift
  
  Typealiases defined in Swift
  
  Swift-style variadics
  
  Nested types
  
  Curried functions
  </code></pre>