Giter Club home page Giter Club logo

Comments (3)

lacklock avatar lacklock commented on June 27, 2024

没看懂这个的使用场景 @kemchenj

from ios-weekly.

kemchenj avatar kemchenj commented on June 27, 2024

@lacklock 这一个我仔细想想,可能作用也不是很大,只能说是后端用 CN,US 之类的简写时,可以少写一个 fullName 属性,直接写为枚举值的名字而已

enum Country: String {
    case china = "CN"
    case canada = "CA"
}

print("\(Country.china)") // "china"

这一个技巧算是可有可无,但国内好像没有类似于 Swift Tips 这个项目,而且这个项目里一些技巧还是挺不错的,我觉得可以改成介绍这个项目

from ios-weekly.

kemchenj avatar kemchenj commented on June 27, 2024

跟前面 iOS Tips 小集类似的项目,不同的是这个项目里讲的是一些 Swift 的小 Tips,里面 #7#22 等技巧我都有实际用于项目中,非常推荐大家看一下

from ios-weekly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.