initWithContentsOfURL:
URLで指定したプロパティリストのファイルから辞書を初期化して返します
-(id)initWithContentsOfURL:(NSURL *)sender
解説
URLで指定したプロパティリストのファイルから読んで、辞書オブジェクトを初期化して返します。初期化できなければnilを返します。
返り値
( id )
初期化した辞書
引数
( NSURL * )sender
URL
フレームワーク
Foundation
クラス
NSDictionary
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSURL *url = [NSURL URLWithString:@"http://www.oomori.com/p/thelist.dict"]; NSDictionary *dic = [[[NSDictionary alloc] initWithContentsOfURL:url] autorelease]; NSLog([dic description]); } @end