Posts

Post not yet marked as solved
0 Replies
818 Views
It appears I can't add a WebP image as an Image Set in an Asset Catalog. Is that correct? As a workaround, I added the WebP image as a Data Set. I'm then loading it as a CGImage with the following code: guard let asset = NSDataAsset(name: imageName), let imageSource = CGImageSourceCreateWithData(asset.data as CFData, nil), let image = CGImageSourceCreateImageAtIndex(imageSource, 0, nil) else { return nil } // Use image Is it fine to store and load WebP images in this way? If not, then what's best practice?
Posted
by Goatma.
Last updated
.
Post not yet marked as solved
1 Replies
760 Views
How do I customize my app's startup experience when using DocumentGroup in SwiftUI with SwiftData? I don't want my users to be greeted with a document browser on startup. Rather, I want to offer an experience like PhotoShop where the user is greeted by an "empty" version of my app's editor view. They can then use something like File->New or File->Open to get started.
Posted
by Goatma.
Last updated
.