Convert `R.image` with `ImageResources` for Xcode 15
MIT License
R2ACConverter is a simple converter from R.swift to Asset Catalog for Xcode 15.
Its name is came from Rswiftresources to Asset Catalog
before | after |
---|---|
R.image.foo() |
UIImage(resource: .foo) |
R.image.bar()! |
UIImage(resource: .bar) |
UIImage(resource: R.image.baz) |
UIImage(resource: .baz) |
Image(R.image.qux) |
Image(.qux) |
Image(uiImage: R.image.quux()!) |
Image(.quux) |
Image(uiImage: UIImage(resource: R.image.corge)!) |
Image(.corge) |
before | after |
---|---|
R.color.foo() |
UIColor(resource: .foo) |
R.color.bar()! |
UIColor(resource: .bar) |
UIColor(resource: R.color.baz) |
UIColor(resource: .baz) |
Color(R.color.qux) |
Color(.qux) |
Color(uiColor: R.color.quux()!) |
Color(.quux) |
Color(uiColor: UIColor(resource: R.color.corge)!) |
Color(.corge) |
mint install 417-72KI/R2ACConverter
brew install 417-72KI/tap/r2acconverter
$ r2acconverter /path/to/project