user3237732 user3237732 - 1 month ago 12
Objective-C Question

Swift enum associated values in Objective-C


  1. Is there a way to use new Swift3 enums with associated value in Objective-C?

  2. Is there a way to declare/bridge Swift3 enums with associated value in Objective-C, if I develop a library and want to give Swift3 users convenient API?


Answer

I'm afraid it's not possible, Apple has a list of Swift Type Compatibility which explicitly excludes enumerations defined in Swift without Int raw value type.

Reference