推荐文章:What's .self, .Type and .Protocol? Understanding Swift Metatypes - swiftrocks.com

编辑简评:`Swift Metatypes`,可能每天都在用,却很难解释清楚到底是什么东西,Apple 文档对此描述也比较晦涩,只说 `type of a type`。文章从最简单的 `String` 开始,讲 `String.Type`、`string.self` 之间的关系,串起 `.Type` `.self` `type(of:)` `Protocol`,最后还介绍了一些 `Metatypes` 使用场景。


更多优质内容,请查看本周周报:
展开
评论