NSDictionary(GCKAdditions)カテゴリーのリファレンス
概要
さまざまな型の値を安全に検索できるように、NSDictionary に便利なメソッドを追加するカテゴリ。
これらのメソッドは、JSON データ オブジェクトのフィールドを取得および設定する場合に特に便利です。
インスタンス メソッドの概要 | |
(nullable NSString *) | - gck_stringForKey:withDefaultValue: |
指定されたフォールバック値を使用して、キーの NSString 値を検索します。その他... | |
(nullable NSString *) | - gck_stringForKey: |
nil のフォールバック値を持つキーの NSString 値を検索します。その他... | |
(NSInteger) | - gck_integerForKey:withDefaultValue: |
指定されたフォールバック値を使用して、キーの NSInteger 値を検索します。その他... | |
(NSUInteger) | - gck_uintegerForKey:withDefaultValue: |
指定されたフォールバック値を使用して、キーの NSUInteger 値を検索します。その他... | |
(NSInteger) | - gck_integerForKey: |
0 のフォールバック値を持つキーの NSInteger 値を検索します。その他... | |
(NSUInteger) | - gck_uintegerForKey: |
0 のフォールバック値を持つキーの NSUInteger 値を検索します。その他... | |
(double) | - gck_doubleForKey:withDefaultValue: |
指定された代替値を使用して、キーの double 値を検索します。その他... | |
(double) | - gck_doubleForKey: |
代替値が 0.0 のキーの double 値を検索します。その他... | |
(BOOL) | - gck_boolForKey:withDefaultValue: |
指定されたフォールバック値を使用して、キーの BOOL 値を検索します。その他... | |
(BOOL) | - gck_boolForKey: |
フォールバック値 NO を使用して、キーの BOOL 値を検索します。その他... | |
(nullable NSDictionary *) | - gck_dictionaryForKey: |
nil のフォールバック値を持つキーの NSDictionary 値を検索します。その他... | |
(nullable NSArray *) | - gck_arrayForKey: |
nil のフォールバック値を持つキーの NSArray 値を検索します。その他... | |
(nullable NSURL *) | - gck_urlForKey: |
nil のフォールバック値を持つキーの NSURL 値を検索します。その他... | |
メソッドの詳細
- (nullable NSString *) gck_stringForKey: | (NSString *) | key | |
withDefaultValue: | (nullable NSString *) | defaultValue | |
- (nullable NSString *) gck_stringForKey: | (NSString *) | key |
- (NSInteger) gck_integerForKey: | (NSString *) | key | |
withDefaultValue: | (NSInteger) | defaultValue | |
- (NSUInteger) gck_uintegerForKey: | (NSString *) | key | |
withDefaultValue: | (NSUInteger) | defaultValue | |
指定されたフォールバック値を使用して、キーの NSUInteger 値を検索します。
- Parameters
-
key The key. defaultValue The default value to return if the key is not found or if its value is not an NSNumber.
- 戻り値
- キーの値(見つかって NSNumber だった場合)。それ以外の場合は、デフォルト値。
- (NSInteger) gck_integerForKey: | (NSString *) | key |
- (NSUInteger) gck_uintegerForKey: | (NSString *) | key |
- (double) gck_doubleForKey: | (NSString *) | key | |
withDefaultValue: | (double) | defaultValue | |
- (double) gck_doubleForKey: | (NSString *) | key |
- (BOOL) gck_boolForKey: | (NSString *) | key | |
withDefaultValue: | (BOOL) | defaultValue | |
- (BOOL) gck_boolForKey: | (NSString *) | key |
- (nullable NSDictionary *) gck_dictionaryForKey: | (NSString *) | key |
nil
のフォールバック値を持つキーの NSDictionary 値を検索します。
- Parameters
-
key The key.
- 戻り値
- キーの値。見つかって NSDictionary だった場合は、
nil
になります。
- (nullable NSArray *) gck_arrayForKey: | (NSString *) | key |