「NSBundle Class Reference」の編集履歴(バックアップ)一覧はこちら
「NSBundle Class Reference」(2010/02/03 (水) 21:47:20) の最新版変更点
追加された行は緑色になります。
削除された行は赤色になります。
//0.下はいじらない
Tags:&tags()
//1.以下に続けてADCでの分類を書き込みリンクする。「NSHogeのクラスリファレンス」、まで書く
&link_toppage(トップ) > [[リファレンス]] > データ管理:ファイル管理 > NSBundleクラスリファレンス
//2.リファレンス日本語名を見出し1で書く。wiki内のリンクで用いられるタイトルになる。翻訳元にもリンクする。
*NSBundle クラスリファレンス [[翻訳元>http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSBundle_Class/Reference/Reference.html]]
//3.翻訳元の最終更新日を書く
このページの最終更新:&date()
ADCの最終更新:2009-07-23
//4.以下、用語は頻繁に出てくる単語の翻訳ガイドラインを参照しながら翻訳する。
//5.ある程度書き終わったらタグ(未完または完成、カテゴリ名×3)をつけて下線を引く(広告との境)。これで終了。それではGood Luck!
//本文開始↓
|BGCOLOR(#eef):継承するクラス|BGCOLOR(#eef):[[NSObject>NSObject Class Reference]]|
|準拠しているプロトコル|[[NSObject (NSObject)>NSObject Protocol Reference]]|
|BGCOLOR(#eef):フレームワーク|BGCOLOR(#eef):/System/Library/Frameworks/Foundation.framework|
|使用可能な環境|Mac OS X v10.0以降|
|BGCOLOR(#eef):宣言ファイル|BGCOLOR(#eef):NSBundle.h|
|コンパニオンガイド|Bundle Programming Guide&br()Resource Programming Guide|
|BGCOLOR(#eef):サンプルコード|BGCOLOR(#eef):CoreRecipes&br()GLSLShowpiece&br()NumberInput_IMKit_Sample&br()OutputBins2PDE&br()Quartz Composer WWDC 2005 TextEdit|
**概観(Overview)
----
NSBundleクラスはファイルシステムでのプログラムから使用することができるコードやリソースの場所を表しています。NSBundleオブジェクトはプログラムのリソースの場所を特定し、動的に実行可能コードをロード、アンロードでき、ローカリゼーションをやりやすくします。XcodeのApplication、Framework、plug-insのプロジェクトタイプを使うことでバンドルを開発することができます。
バンドルの構造はターゲットのプラットフォームと開発するバンドルの型に多くを依存しますが、NSBundleクラスはこの基礎的な構造を大抵の場合(全てではありませんが)隠蔽します。バンドルからリソースをロードするのに使う多くのメソッドは自動的に最初のディレクトリを特定し、既知の場所からリソースを検索します。(Mac OS XとiPhone OSの)アプリケーションバンドルの構造についての情報は「Bundle Programming Guide」を参照してください。フレームワークの構造については「Framework Programming Guide」を、Mac OS Xのプラグインの構造については「Code Loading Programming Topics for Cocoa」を参照してください。
Mac OS Xアプリケーションにnibファイルやイメージファイルを読み込む方法についての更なる情報については「NSBundle Additions Reference」を、iPhoneアプリケーションにnibファイルを読み込む方法についての情報については「NSBundle UIKit Additions Reference」を参照してください。
Core Foundationの名前と一致するFoundationの他のクラス(NSStringとCFString)と違って、NSBundleオブジェクトはCFBundleへの参照にキャスト(toll-free bridged)することはできません。CFBundleで提供されている機能が必要な時は、今のところはCFBundleを生成してCFBundle APIを使うことができます。toll-free bridge 似ついての詳しい情報は「Interchangeable Data Types」を参照してください。
**このクラスでできること(Tasks)
----
***NSBundleの初期化(Initializing an NSBundle)
&space(4)+ bundleWithURL:
&space(4)+ bundleWithPath:
&space(4)– initWithURL:
&space(4)– initWithPath:
***NSBundleの取得(Getting an NSBundle)
&space(4)+ bundleForClass:
&space(4)+ bundleWithIdentifier:
&space(4)+ mainBundle
&space(4)+ allBundles
&space(4)+ allFrameworks
***バンドルされたクラスの取得(Getting a Bundled Class)
&space(4)– classNamed:
&space(4)– principalClass
***リソースの検索(Finding Resources)
&space(4)– URLForResource:withExtension:subdirectory:
&space(4)+ pathForResource:ofType:inDirectory:
&space(4)– URLForResource:withExtension:
&space(4)– pathForResource:ofType:
&space(4)– URLsForResourcesWithExtension:subdirectory:
&space(4)– pathForResource:ofType:inDirectory:
&space(4)– URLForResource:withExtension:subdirectory:localization:
&space(4)– pathForResource:ofType:inDirectory:forLocalization:
&space(4)+ pathsForResourcesOfType:inDirectory:
&space(4)– pathsForResourcesOfType:inDirectory:
&space(4)– URLsForResourcesWithExtension:subdirectory:localization:
&space(4)– pathsForResourcesOfType:inDirectory:forLocalization:
&space(4)+ URLForResource:withExtension:subdirectory:inBundleWithURL:
&space(4)+ URLsForResourcesWithExtension:subdirectory:inBundleWithURL:
&space(4)– resourcePath
***バンドルディレクトリの取得(Getting the Bundle Directory)
&space(4)– bundleURL
&space(4)– bundlePath
***バンドル情報の取得(Getting Bundle Information)
&space(4)– bundleIdentifier
&space(4)– infoDictionary
&space(4)– objectForInfoDictionaryKey:
&space(4)– builtInPlugInsURL
&space(4)– builtInPlugInsPath
&space(4)– executableURL
&space(4)– executablePath
&space(4)– URLForAuxiliaryExecutable:
&space(4)– pathForAuxiliaryExecutable:
&space(4)– privateFrameworksURL
&space(4)– privateFrameworksPath
&space(4)– sharedFrameworksURL
&space(4)– sharedFrameworksPath
&space(4)– sharedSupportURL
&space(4)– sharedSupportPath
&space(4)– resourceURL
***ローカライズされたリソースの管理(Managing Localized Resources)
&space(4)– localizedStringForKey:value:table:
***バンドル内のコードのロード(Loading a Bundle’s Code)
&space(4)– executableArchitectures
&space(4)– preflightAndReturnError:
&space(4)– load
&space(4)– loadAndReturnError:
&space(4)– isLoaded
&space(4)– unload
***ローカリゼーションの管理(Managing Localizations)
&space(4)+ preferredLocalizationsFromArray:
&space(4)+ preferredLocalizationsFromArray:forPreferences:
&space(4)– localizations
&space(4)– developmentLocalization
&space(4)– preferredLocalizations
&space(4)– localizedInfoDictionary
**クラスメソッド
----
**インスタンスメソッド
----
**定数(Constants)
----
**通知(Notifications)
----
//0.下はいじらない
Tags:&tags()
//1.以下に続けてADCでの分類を書き込みリンクする。「NSHogeのクラスリファレンス」、まで書く
&link_toppage(トップ) > [[リファレンス]] > データ管理:ファイル管理 > NSBundleクラスリファレンス
//2.リファレンス日本語名を見出し1で書く。wiki内のリンクで用いられるタイトルになる。翻訳元にもリンクする。
*NSBundle クラスリファレンス [[翻訳元>http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSBundle_Class/Reference/Reference.html]]
//3.翻訳元の最終更新日を書く
このページの最終更新:&date()
ADCの最終更新:2009-07-23
//4.以下、用語は頻繁に出てくる単語の翻訳ガイドラインを参照しながら翻訳する。
//5.ある程度書き終わったらタグ(未完または完成、カテゴリ名×3)をつけて下線を引く(広告との境)。これで終了。それではGood Luck!
//本文開始↓
|BGCOLOR(#eef):継承するクラス|BGCOLOR(#eef):[[NSObject>NSObject Class Reference]]|
|準拠しているプロトコル|[[NSObject (NSObject)>NSObject Protocol Reference]]|
|BGCOLOR(#eef):フレームワーク|BGCOLOR(#eef):/System/Library/Frameworks/Foundation.framework|
|使用可能な環境|Mac OS X v10.0以降|
|BGCOLOR(#eef):宣言ファイル|BGCOLOR(#eef):NSBundle.h|
|コンパニオンガイド|Bundle Programming Guide&br()Resource Programming Guide|
|BGCOLOR(#eef):サンプルコード|BGCOLOR(#eef):CoreRecipes&br()GLSLShowpiece&br()NumberInput_IMKit_Sample&br()OutputBins2PDE&br()Quartz Composer WWDC 2005 TextEdit|
**概観(Overview)
----
NSBundleクラスはファイルシステムでのプログラムから使用することができるコードやリソースの場所を表しています。NSBundleオブジェクトはプログラムのリソースの場所を特定し、動的に実行可能コードをロード、アンロードでき、ローカリゼーションをやりやすくします。XcodeのApplication、Framework、plug-insのプロジェクトタイプを使うことでバンドルを開発することができます。
バンドルの構造はターゲットのプラットフォームと開発するバンドルの型に多くを依存しますが、NSBundleクラスはこの基礎的な構造を大抵の場合(全てではありませんが)隠蔽します。バンドルからリソースをロードするのに使う多くのメソッドは自動的に最初のディレクトリを特定し、既知の場所からリソースを検索します。(Mac OS XとiPhone OSの)アプリケーションバンドルの構造についての情報は「Bundle Programming Guide」を参照してください。フレームワークの構造については「Framework Programming Guide」を、Mac OS Xのプラグインの構造については「Code Loading Programming Topics for Cocoa」を参照してください。
Mac OS Xアプリケーションにnibファイルやイメージファイルを読み込む方法についての更なる情報については「NSBundle Additions Reference」を、iPhoneアプリケーションにnibファイルを読み込む方法についての情報については「NSBundle UIKit Additions Reference」を参照してください。
Core Foundationの名前と一致するFoundationの他のクラス(NSStringとCFString)と違って、NSBundleオブジェクトはCFBundleへの参照にキャスト(toll-free bridged)することはできません。CFBundleで提供されている機能が必要な時は、今のところはCFBundleを生成してCFBundle APIを使うことができます。toll-free bridge についての詳しい情報は「Interchangeable Data Types」を参照してください。
**このクラスでできること(Tasks)
----
***NSBundleの初期化(Initializing an NSBundle)
&space(4)+ bundleWithURL:
&space(4)+ bundleWithPath:
&space(4)– initWithURL:
&space(4)– initWithPath:
***NSBundleの取得(Getting an NSBundle)
&space(4)+ bundleForClass:
&space(4)+ bundleWithIdentifier:
&space(4)+ mainBundle
&space(4)+ allBundles
&space(4)+ allFrameworks
***バンドルされたクラスの取得(Getting a Bundled Class)
&space(4)– classNamed:
&space(4)– principalClass
***リソースの検索(Finding Resources)
&space(4)– URLForResource:withExtension:subdirectory:
&space(4)+ pathForResource:ofType:inDirectory:
&space(4)– URLForResource:withExtension:
&space(4)– pathForResource:ofType:
&space(4)– URLsForResourcesWithExtension:subdirectory:
&space(4)– pathForResource:ofType:inDirectory:
&space(4)– URLForResource:withExtension:subdirectory:localization:
&space(4)– pathForResource:ofType:inDirectory:forLocalization:
&space(4)+ pathsForResourcesOfType:inDirectory:
&space(4)– pathsForResourcesOfType:inDirectory:
&space(4)– URLsForResourcesWithExtension:subdirectory:localization:
&space(4)– pathsForResourcesOfType:inDirectory:forLocalization:
&space(4)+ URLForResource:withExtension:subdirectory:inBundleWithURL:
&space(4)+ URLsForResourcesWithExtension:subdirectory:inBundleWithURL:
&space(4)– resourcePath
***バンドルディレクトリの取得(Getting the Bundle Directory)
&space(4)– bundleURL
&space(4)– bundlePath
***バンドル情報の取得(Getting Bundle Information)
&space(4)– bundleIdentifier
&space(4)– infoDictionary
&space(4)– objectForInfoDictionaryKey:
&space(4)– builtInPlugInsURL
&space(4)– builtInPlugInsPath
&space(4)– executableURL
&space(4)– executablePath
&space(4)– URLForAuxiliaryExecutable:
&space(4)– pathForAuxiliaryExecutable:
&space(4)– privateFrameworksURL
&space(4)– privateFrameworksPath
&space(4)– sharedFrameworksURL
&space(4)– sharedFrameworksPath
&space(4)– sharedSupportURL
&space(4)– sharedSupportPath
&space(4)– resourceURL
***ローカライズされたリソースの管理(Managing Localized Resources)
&space(4)– localizedStringForKey:value:table:
***バンドル内のコードのロード(Loading a Bundle’s Code)
&space(4)– executableArchitectures
&space(4)– preflightAndReturnError:
&space(4)– load
&space(4)– loadAndReturnError:
&space(4)– isLoaded
&space(4)– unload
***ローカリゼーションの管理(Managing Localizations)
&space(4)+ preferredLocalizationsFromArray:
&space(4)+ preferredLocalizationsFromArray:forPreferences:
&space(4)– localizations
&space(4)– developmentLocalization
&space(4)– preferredLocalizations
&space(4)– localizedInfoDictionary
**クラスメソッド
----
**インスタンスメソッド
----
**定数(Constants)
----
**通知(Notifications)
----
表示オプション
横に並べて表示:
変化行の前後のみ表示: