Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?
like image 845
user3237732 Avatar asked Dec 19 '22 12:12

user3237732


1 Answers

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

like image 175
David Rodrigues Avatar answered Dec 24 '22 02:12

David Rodrigues