public class NSBundle extends NSObject
Modifier and Type | Method and Description |
---|---|
String |
bundlePath()
The full path of this bundle.
|
static NSBundle |
bundleWithPath(String fullpath)
Returns the bundle that corresponds to the specified path.
|
String |
localizedStringForKey(String key,
String value,
String table)
Returns the localized version of the specified String associated with the
specified key of the given table.
|
static NSBundle |
mainBundle()
Returns the bundle that corresponds to the current executable.
|
String |
pathForResource(String resource,
String type)
Returns the full path of the specified file.
|
String |
pathForResource(String resource,
String type,
String directory)
Returns the full path of the file specified by its subpath and name.
|
NSURL |
URLForResource(String name,
String ext)
Return a NSURL given a resource name and extension
|
NSURL |
URLForResource(String name,
String ext,
String subpath)
Return a NSURL given a resource name and extension, under specific subdirectory
|
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public static NSBundle bundleWithPath(String fullpath)
fullpath
- The path for which the bundle is requested.public static NSBundle mainBundle()
public String pathForResource(String resource, String type, String directory)
resource
- The resource file.type
- The type of the file.directory
- The subpath of the file.public String pathForResource(String resource, String type)
resource
- The resource file.type
- The type of the file.public NSURL URLForResource(String name, String ext, String subpath)
name
- the name of the resourceext
- the extension of the resourcesubpath
- the subdirectory where this resource existspublic NSURL URLForResource(String name, String ext)
name
- the name of the resourceext
- the extension of the resourcepublic String bundlePath()
public String localizedStringForKey(String key, String value, String table)
key
- The key of the String.value
- The initial String.table
- The table of the initial String.Copyright © 2020. All rights reserved.