Listing enum cases using CaseIterable in Swift

This can help you in creating tables in Swift featuring a dog and an elephant

Steven Curtis
The Startup
Published in
4 min readNov 7, 2019

--

CaseIterable is a protocol, and if an enum conforms to the protocol Swift helpfully generates an array of all the cases in an enum.

These are cases. They have nothing to do with CaseIterable. Come on! Think!

That seems like it might be unimportant. But we can use it to help populate our table.

--

--