Created
June 1, 2012 09:51
-
-
Save aegzorz/2850852 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static NSString* __AppResources[] = { | |
@"resources/images/my-image.png", | |
@"resources/images/my-image2.png", | |
@"resources/images/subfolder/my-image.png", | |
@"resources/test.pdf", | |
nil | |
}; | |
static const NSUInteger kImageResourcesImagesMyImage = 0; | |
static const NSUInteger kImageResourcesImagesMyImage2 = 1; | |
static const NSUInteger kImageResourcesImagesSubfolderMyImage = 2; | |
static const NSUInteger kFileResourcesTest = 3; | |
static __inline__ NSString* GetResourcePath( const NSUInteger identifier ) { | |
return ( identifier < 4 ) ? __AppResources[ identifier ] : nil; | |
} | |
static __inline__ UIImage* GetImageWithID( const NSUInteger identifier ) { | |
return [UIImage imageNamed:GetResourcePath( identifier )]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment