Swift: overriding typealias inside subclass

后端 未结 2 1699
耶瑟儿~
耶瑟儿~ 2021-02-19 00:56

So I was thinking about a custom pattern in my project, but I can\'t get it to work. The main idea is to change the typealias on every subclass to get access to the

2条回答
  •  时光说笑
    2021-02-19 01:08

    Would something like this work for your purposes?

    class MyClass {
    
    }
    
    class MySubclass1: MyClass {
    
    }
    
    class MySubclass2: MyClass {
    
    }
    

提交回复
热议问题