How to cast a struct to Anyobject in Swift 2?

前端 未结 1 2091
南方客
南方客 2021-02-20 14:42

I have,

struct S {}

Along with,

func y (x: S) -> AnyObject {}

In Swift 2, is it possible to, within y(), <

相关标签:
1条回答
  • 2021-02-20 15:27

    A Struct cannot conform to AnyObject. It can only conform to Any

    0 讨论(0)
提交回复
热议问题