NSBundle(SPNSExtensions) Category Reference
| Declared in | SPNSExtensions.h |
Tasks
-
– pathForResource:Finds the path for a resource. ‘name’ may include directories and the file extension.
-
– pathForResource:withScaleFactor:Finds the path for a resource with a certain scale factor (a file with a suffix like ‘@2x’).
-
+ appBundleReturns the NSBundle object of the current application. Different to
[NSBundle mainBundle], this works in unit tests, as well.
Class Methods
appBundle
Returns the NSBundle object of the current application. Different to [NSBundle mainBundle],
this works in unit tests, as well.
+ (instancetype)appBundleDiscussion
Returns the NSBundle object of the current application. Different to [NSBundle mainBundle],
this works in unit tests, as well.
Declared In
SPNSExtensions.hInstance Methods
pathForResource:
Finds the path for a resource. ‘name’ may include directories and the file extension.
- (NSString *)pathForResource:(NSString *)nameDiscussion
Finds the path for a resource. ‘name’ may include directories and the file extension.
Declared In
SPNSExtensions.hpathForResource:withScaleFactor:
Finds the path for a resource with a certain scale factor (a file with a suffix like ‘@2x’).
- (NSString *)pathForResource:(NSString *)name withScaleFactor:(float)factorReturn Value
Returns the path to the scaled resource if it exists; otherwise, the path to the unscaled resource - or nil if that does not exist, either.
Discussion
Finds the path for a resource with a certain scale factor (a file with a suffix like ‘@2x’).
Declared In
SPNSExtensions.h