-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
John Sundell 的 Swift Tips 更新了 #53 —— 使用字符串枚举时的字符串交互小技巧 #12
Comments
没看懂这个的使用场景 @kemchenj |
@lacklock 这一个我仔细想想,可能作用也不是很大,只能说是后端用 CN,US 之类的简写时,可以少写一个 enum Country: String {
case china = "CN"
case canada = "CA"
}
print("\(Country.china)") // "china" 这一个技巧算是可有可无,但国内好像没有类似于 Swift Tips 这个项目,而且这个项目里一些技巧还是挺不错的,我觉得可以改成介绍这个项目 |
Awhisper
added a commit
that referenced
this issue
Mar 25, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/johnsundell/swifttips#53-string-based-enums-in-string-interpolation
The text was updated successfully, but these errors were encountered: