Makes loading device-dependant resoures (assets) easier. More...
#import <AssetHelper.h>
Static Public Member Functions | |
(NSString *) | + getDeviceSpecificFileNameFor: |
Takes a string that is a filename (with or without path component) and returns the correct filename depending on the current device. |
Makes loading device-dependant resoures (assets) easier.
By default it simply assumes all iPad resources to be suffixed by "-ipad" before the filename extension. On iPhone/iPod Touch it will simply return the given filename, so the overhead is minimal while the iPad has enough power to cope with modifying a resource strings on the fly.
+ (NSString *) getDeviceSpecificFileNameFor: | (NSString*) | fileName |
Takes a string that is a filename (with or without path component) and returns the correct filename depending on the current device.
On iPhone/iPod Touch it will simply return fileName. On iPad it will append "-ipad" to the filename and before the suffix and return that. By naming all corresponding iPad assets with the "-ipad" suffix and using this function you can avoid a lot of ifdef and load different resource files with the same code.