s3协议和swift协议
In this quick tutorial, we will learn about the CaseIterable
protocol in Swift. This handy protocol allows us to iterate over an enum’s cases.
在本快速教程中,我们将学习Swift中的CaseIterable
协议。 这个方便的协议使我们可以遍历枚举的情况。
开始吧 (Let’s Start)
Consider the following simple enum:
考虑以下简单的枚举:
![Image for post](https://miro.medium.com/max/9999/1*MnLGKos9nxpURL-Qm1K80w.png)
By conforming it to the