Type Safely

Type Safely

Using The .imageScale Modifier And Specifying Image Orientation

Daily Coding Tip 085

Millie Sturgeon's avatar
Millie Sturgeon
May 10, 2022
∙ Paid
Image by Erik Karits from Pixabay

I’m going to start by extending some enums.

Image.Scale isn’t CaseIterable, meaning I need to add conformance which requires the array of all of the cases. I’ve provided a readable name for both because, although they have a raw value, it’s an Int and not a String. The enum Image.Orientation already conforms to CaseIterab…

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2026 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture