removeAllObjects
INDEX>Foundation>NSMutableDictionary>
変更可能な辞書から登録されているもの全てを削除します
解説
変更可能な辞書から登録されているもの全てを削除します。
返り値
( void )
なし
引数
フレームワーク
Foundation
クラス
NSMutableDictionary
Instance Methods
使用可能
10.0
参照
- removeObjectForKey:
- removeObjectsForKeys:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys: @"a",@"あ", @"i",@"い", @"u",@"う",nil]; NSMutableDictionary *aMutableDictionary = [ NSMutableDictionary dictionaryWithCapacity:1 ]; [aMutableDictionary addEntriesFromDictionary:dic]; [aMutableDictionary removeAllObjects]; NSLog([aMutableDictionary description]); } @end