Panoramica
Una categoria che aggiunge alcuni metodi pratici a NSDictionary per l'impostazione e la ricerca in sicurezza di valori di vari tipi.
Questi metodi sono particolarmente utili per recuperare e impostare i campi degli oggetti di dati JSON.
Riepilogo del metodo di istanza | |
(NSString *__nullable) | - gck_stringForKey:withDefaultValue: |
Cerca un valore NSString per una chiave, con un determinato valore di riserva. Altro... | |
(NSString *__nullable) | - gck_stringForKey: |
Cerca un valore NSString per una chiave, con valore di riserva nil . Altro... | |
(NSInteger) | - gck_integerForKey:withDefaultValue: |
Cerca un valore NSInteger per una chiave, con un determinato valore di riserva. Altro... | |
(NSUInteger) | - gck_uintegerForKey:withDefaultValue: |
Cerca un valore NSUInteger per una chiave, con un determinato valore di riserva. Altro... | |
(NSInteger) | - gck_integerForKey: |
Cerca un valore NSInteger per una chiave, con valore di riserva 0 . Altro... | |
(NSUInteger) | - gck_uintegerForKey: |
Cerca un valore NSUInteger per una chiave, con valore di riserva 0 . Altro... | |
(double) | - gck_doubleForKey:withDefaultValue: |
Cerca un valore doppio per una chiave, con un determinato valore di riserva. Altro... | |
(double) | - gck_doubleForKey: |
Cerca un valore doppio per una chiave, con un valore di riserva pari a 0.0 . Altro... | |
(BOOL) | - gck_boolForKey:withDefaultValue: |
Cerca un valore BOOL per una chiave, con un determinato valore di riserva. Altro... | |
(BOOL) | - gck_boolForKey: |
Cerca un valore BOOL per una chiave, con valore di riserva NO . Altro... | |
(NSDictionary *__nullable) | - gck_dictionaryForKey: |
Cerca un valore NSDictionary per una chiave, con valore di riserva nil . Altro... | |
(NSArray *__nullable) | - gck_arrayForKey: |
Cerca un valore NSArray per una chiave, con un valore di riserva pari a nil . Altro... | |
(NSURL *__nullable) | - gck_urlForKey: |
Cerca un valore NSURL per una chiave, con un valore di riserva pari a nil . Altro... | |
(void) | - gck_setStringValue:forKey: |
Imposta un valore NSString per una chiave. Altro... | |
(void) | - gck_setIntegerValue:forKey: |
Imposta un valore NSInteger per una chiave. Altro... | |
(void) | - gck_setUIntegerValue:forKey: |
Imposta un valore NSUInteger per una chiave. Altro... | |
(void) | - gck_setDoubleValue:forKey: |
Imposta un valore Double per una chiave. Altro... | |
(void) | - gck_setBoolValue:forKey: |
Imposta un valore BOOL per una chiave. Altro... | |
Dettaglio metodo
- (NSString *__nullable) gck_stringForKey: | (NSString *) | key | |
withDefaultValue: | (NSString *__nullable) | defaultValue | |
Cerca un valore NSString per una chiave, con un determinato valore di riserva.
- Parameters
-
key The key. defaultValue The default value to return if the key is not found or if its value is not an NSString.
- Ritorni
- Il valore della chiave, se è stata trovata ed era una NSString; altrimenti il valore predefinito.
- (NSString *__nullable) gck_stringForKey: | (NSString *) | key |
- (NSInteger) gck_integerForKey: | (NSString *) | key | |
withDefaultValue: | (NSInteger) | defaultValue | |
Cerca un valore NSInteger per una chiave, con un determinato valore di riserva.
- Parameters
-
key The key. defaultValue The default value to return if the key is not found or if its value is not an NSNumber.
- Ritorni
- Il valore della chiave, se è stata trovata ed era un NSNumber; altrimenti il valore predefinito.
- (NSUInteger) gck_uintegerForKey: | (NSString *) | key | |
withDefaultValue: | (NSUInteger) | defaultValue | |
Cerca un valore NSUInteger per una chiave, con un determinato valore di riserva.
- Parameters
-
key The key. defaultValue The default value to return if the key is not found or if its value is not an NSNumber.
- Ritorni
- Il valore della chiave, se è stata trovata ed era un NSNumber; altrimenti il valore predefinito.
- (NSInteger) gck_integerForKey: | (NSString *) | key |
- (NSUInteger) gck_uintegerForKey: | (NSString *) | key |
Cerca un valore NSUInteger per una chiave, con valore di riserva 0
.
- Parameters
-
key The key.
- Ritorni
- Il valore della chiave, se è stata trovata ed era un NSNumber; in caso contrario,
0
.
- (double) gck_doubleForKey: | (NSString *) | key | |
withDefaultValue: | (double) | defaultValue | |
Cerca un valore doppio per una chiave, con un determinato valore di riserva.
- Parameters
-
key The key. defaultValue The default value to return if the key is not found or if its value is not an NSNumber.
- Ritorni
- Il valore della chiave, se è stata trovata ed era un NSNumber; altrimenti il valore predefinito.
- (double) gck_doubleForKey: | (NSString *) | key |
Cerca un valore doppio per una chiave, con un valore di riserva pari a 0.0
.
- Parameters
-
key The key.
- Ritorni
- Il valore della chiave, se è stata trovata ed era un NSNumber; in caso contrario,
0.0
.
- (BOOL) gck_boolForKey: | (NSString *) | key | |
withDefaultValue: | (BOOL) | defaultValue | |
Cerca un valore BOOL per una chiave, con un determinato valore di riserva.
- Parameters
-
key The key. defaultValue The default value to return if the key is not found or if its value is not an NSNumber.
- Ritorni
- Il valore della chiave, se è stata trovata ed era un NSNumber; altrimenti il valore predefinito.
- (BOOL) gck_boolForKey: | (NSString *) | key |
Cerca un valore BOOL per una chiave, con valore di riserva NO
.
- Parameters
-
key The key.
- Ritorni
- Il valore della chiave, se è stata trovata ed era un NSNumber; in caso contrario,
NO
.
- (NSDictionary *__nullable) gck_dictionaryForKey: | (NSString *) | key |
Cerca un valore NSDictionary per una chiave, con valore di riserva nil
.
- Parameters
-
key The key.
- Ritorni
- Il valore della chiave, se è stata trovata ed era un NSDictionary; altrimenti,
nil
.
- (NSArray *__nullable) gck_arrayForKey: | (NSString *) | key |
- (NSURL *__nullable) gck_urlForKey: | (NSString *) | key |
- (void) gck_setStringValue: | (NSString *) | value | |
forKey: | (NSString *) | key | |
Imposta un valore NSString per una chiave.
- Parameters
-
value The value. key The key.
- (void) gck_setIntegerValue: | (NSInteger) | value | |
forKey: | (NSString *) | key | |
Imposta un valore NSInteger per una chiave.
- Parameters
-
value The value. key The key.
- (void) gck_setUIntegerValue: | (NSUInteger) | value | |
forKey: | (NSString *) | key | |
Imposta un valore NSUInteger per una chiave.
- Parameters
-
value The value. key The key.
- (void) gck_setDoubleValue: | (double) | value | |
forKey: | (NSString *) | key | |
Imposta un valore Double per una chiave.
- Parameters
-
value The value. key The key.
- (void) gck_setBoolValue: | (BOOL) | value | |
forKey: | (NSString *) | key | |
Imposta un valore BOOL per una chiave.
- Parameters
-
value The value. key The key.