How to abstract singletons using a Property Wrapper on types?

后端 未结 0 1853
暗喜
暗喜 2021-02-05 14:03

In a protocol, I\'d like to create a single instance from functions so I use a container to store the static instances like this:

protocol MyProtocol {
    func n         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题