description
辞書を文字列で返します
-( NSString * )description
解説
辞書をプロパティリストフォーマットとして文字列で返します。
キーが全てNSStringなら昇順、そうでなければ順序は未定義です。
デバッグ目的の使用です。
返り値
( NSString * )
文字列
フレームワーク
Foundation
クラス
NSDictionary
Instance Methods
使用可能
OS X 10.0以降
iOS 2.0以降
参照
- descriptionWithLocale:
- descriptionWithLocale:indent:
例文
#pragma mark NSDictionary description -(void)method015 { //NSDictionaryを作成 NSDictionary *aDictionary = [NSDictionary dictionaryWithObject:@"aaa" forKey:@"key1"]; NSLog(@"%s aDictionary %p = %@",__FUNCTION__,aDictionary,[aDictionary description]); //=>-[OOOAppDelegate method015] aDictionary 0x682d150 = {key1 = aaa;} }