R.objc
R.objc copied to clipboard
Support namespaces in .xcassets
Hey
Currently this script is not supporting namespaces in .xcassets, would be great to have it working. Swift version handles those properly, allowing duplicated names.
What do you mean for namespaces? Are they the groups/folders you can create in the assets to organize the images?
@guidosabatini-sysdata Right now images are generated into one flat object, which creates few possible conflicts when you have same image names into your project:
- Having same image name as assets catalog name creates a conflict
- Having same image name on normal folders and inside assets catalog creates a conflict
- Having same image names in different namespaces in assets catalog creates a conflict, normally here it's possible to have
imageNamed:@"namespace1/button"
andimageNamed:@"namespace2/button"
.
If you compare that to R.swift in Swift - they do generate separate objects for each assets catalog or folder so you are doing R.assetscatalogname.namespace1.button
for example.