Basically my code heavily uses [UIImage imageNamed]
which by default fetches image from app bundle.
Now I want the images to be returned from a directory deep within Documents (or library or whatever) - instead of main bundle. And since there are so many instances of imageNamed calls, I am considering to extend (read replace) UIImage ImageNamed implementation for this purpose.
I already went through this but can't quite make up what should I do, and what is best:
- Make a category of UIImage
- Create a subclass of UIImage
- Method swizzling
I also do not know if I have to take care of @2x images. My current bundle includes bunch of them, and I suppose my implementation will also have to take care of it. But not sure how.