Define struct that is treated like a class in Swift

后端 未结 3 821
-上瘾入骨i
-上瘾入骨i 2021-01-12 05:30

In Swift a String structure is also treated as a class object like when using the NSCoder encodeObject(_:forKey:) method. I do know th

3条回答
  •  执笔经年
    2021-01-12 06:08

    This isn't currently possible. SE-0058 will address it, but is deferred out of Swift 3. A final implementation of SE-0058 would be hoped to handle more than just ObjC bridging; for example allowing C++ or .NET bridging as well in a more generic solution.

提交回复
热议问题