Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Using The .imageScale Modifier And Specifying Image Orientation

Using The .imageScale Modifier And Specifying Image Orientation

Daily Coding Tip 085

Millie Sturgeon's avatar
Millie Sturgeon
May 10, 2022
∙ Paid

Share this post

Type Safely
Type Safely
Using The .imageScale Modifier And Specifying Image Orientation
Share
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…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share