Questions tagged «rawrepresentable»

3
Swift枚举继承
您可以在Swift中继承枚举吗?关于枚举继承,应注意哪些规则? 以下测试代码: enum TemperatureUnit: Int { case Kelvin, Celcius, Farenheit } enum TemperatureSubunit : Temperature { } 产生 error: type 'TemperatureSubunit' does not conform to protocol 'RawRepresentable'
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.