Как я могу сохранить UIImage в NSDictionary?

Как я могу сохранить UIImage в NSDictionary?

17
задан Ajumal 2 April 2015 в 08:47
поделиться

3 ответа

Да, вы можете:

NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:1];
UIImage *img = ...;
[dict setObject:img forKey:@"aKeyForYourImage"];

UIImage *imgAgain = [dict objectForKey:@"aKeyForYourImage"];
16
ответ дан 30 November 2019 в 12:50
поделиться

[Словарь SetObject: YourImage Freekey: @ «Какой ключ вы хотите»];

непроверенный; -)

1
ответ дан 30 November 2019 в 12:50
поделиться

[Dict SetObject: Image Freekey: @ «ImagetoStore»];

;
1
ответ дан 30 November 2019 в 12:50
поделиться