Static Public Member Functions

AssetHelper Class Reference

Makes loading device-dependant resoures (assets) easier. More...

#import <AssetHelper.h>

List of all members.

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.

Detailed Description

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.


Member Function Documentation

+ (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.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Properties