Don't generate static resource for images with dot-suffix
Apparently, UIImage(named:) strips away anything that looks like a file extension when looking up an image.
For example:
If there's two images: my-icon and my-icon.selected
R.swift will generate: R.image.myIcon and R.image.myIconSelected
But when trying to load UIImage(named: "my-icon.selected"), the first image (my-icon) will be returned. Only if that file isn't available, will the full image name be used.
For this reason, I think R.swift should refuse to generate myIconSelected and emit a warning in this case, since the image can't be loaded anyway.
This still seems to be an unsolved problem with UIKit, right? And it's even worse now when you try to provide fallback assets for system symbols, since their names contain lots of dots. Assets are loaded or not virtually at random.
let exam = UIImage(named: data.newImage, in: bundle, compatibleWith: self.traitCollection)
How can i compatibleWithTraitCollection refactor this?