ImageRenderer was added in iOS 16/macOS 13 and it lets us turn any SwiftUI view into an image:
As it provides separate properties for NSImage and UIImage, I found myself wanting to push the hashtag conditionals out of my (eventually) multi-platform app and down into here. 🥰
I'm not entirely sure that Image.swift is the "correct" place to put this, but adding a new file felt a bit extraneous for code that's shorter than its own PR verbiage.
ImageRenderer was added in iOS 16/macOS 13 and it lets us turn any SwiftUI view into an image: As it provides separate properties for
NSImage
andUIImage
, I found myself wanting to push the hashtag conditionals out of my (eventually) multi-platform app and down into here. 🥰I'm not entirely sure that
Image.swift
is the "correct" place to put this, but adding a new file felt a bit extraneous for code that's shorter than its own PR verbiage.Cheers