-
-
Save Pasanpr/bda1bfb8e302ed80abf9204b7f3ff6d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum WeatherIcon: String { | |
case clearDay = "clear-day" | |
case clearNight = "clear-night" | |
case rain = "rain" | |
case snow = "snow" | |
case sleet = "sleet" | |
case wind = "wind" | |
case fog = "fog" | |
case cloudy = "cloudy" | |
case partlyCloudyDay = "partly-cloudy-day" | |
case partlyCloudyNight = "partly-cloudy-night" | |
case `default` | |
init(rawValue: String) { | |
switch rawValue { | |
case "clear-day": self = .clearDay | |
case "clear-night": self = .clearNight | |
case "rain": self = .rain | |
case "snow": self = .snow | |
case "sleet": self = .sleet | |
case "wind": self = .wind | |
case "fog": self = .fog | |
case "cloudy": self = .cloudy | |
case "partly-cloudy-day": self = .partlyCloudyDay | |
case "partly-cloudy-night": self = .partlyCloudyNight | |
default: self = .default | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment