Swift enum associated values in Objective-C

前端 未结 2 945
梦谈多话
梦谈多话 2021-01-15 05:46
  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-
2条回答
  •  爱一瞬间的悲伤
    2021-01-15 06:10

    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

提交回复
热议问题