I could easily do this by adding conformance to a new protocol called Codable.
我可以轻松做到这点,只要在一个叫做 Codable 的新协议里添加一致性就好了。
Apple 最新资讯
So I will start once again by declaring conformance to a new delegate protocol, UICollectionView drop delegate.
我将从再次声明遵守新的委托协议开始,也就是 UICollectionView 放置委托。
Apple 最新资讯
And if the properties of this type have types that also conform to Codable, this is literally all the code I need to write because the conformance to this protocol is synthesized by the compiler.