nsdictionary - How can I use an integer value as 'key' to set value in NSMutableDictionaryw with Ios -


how can use integer value 'key' set float value in nsmutabledictionary ?

with nsnumber literals can following

[dict setobject:@5.562 forkey:@5]; //or int key = 5; float value = 5.562; [dict setobject:@(value) forkey:@(key)]; 

and retrieve:

float retrval = [[dict objectforkey:@5] floatvalue]; 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -