iphone - Java HashMap to iOS -


I'm a clean Java / C # developer but now after the creation of my original Android app, I will be working with IOS (Objectivegka) I am trying to expand my knowledge. Now I am on the point that there is little difference between iOS and Android. I'm trying to change my Java Hashim to one in iOS, but I found out there is no equivalent for the iOS version.

My Java Hashim for my Android app looks like this:

  Maps & lt; String, string & gt;   

Now I want this for my iOS app. But I can not see the solution I have done some research and found that there is something like NSDition or NSMutableDictionary that can help me.

After a little more effort, I came to know that an NSDictionary is irreversible, but with the help of the NSMutableDictionary data structure, you can dynamically add entries and delete as needed, so I think I will use the NSMUtable AccessEdder for my Hashmap Can be used to dynamically add / remove content in the use of.

After more research on the Internet, I came to know that it is possible to do the following:

 NSMutableDictionary * testHashMap = @ {@ "FirstKe"): "First Itam ", @" Seconds ":" Second Itam ", @" Thurdky ":" Third Itam ", @" Fourth Key ":" Fourth Etam "};   

Is this a good way to create a Hashmax in the Objective's (iOS)? Or is there something better?

Now I want to add fifth item how is it possible to do this? Is there anything like this:

  testHashMap.add ("Fifth Cayenne", "Fifth Eat");   

And how do I get an item from testHashMap in iOS? Do I have to do something like this:

  string second itam = testhashap ("seconds of");   

Thanks for all help!

you can

  testhash [@ "fifthke"] = @ "Fifth item";   

and read them with

  testHashMap [["" Fifth "];   

MNSMutableDictionary Dynamic Data It's a great way to store and read. But if you have static data - Use only NSDictionary if your data is mostly stable but you sometimes change it - still use NSDictionary and it's [MICRO COOP] Uncheck using, then add new items there and use it [mutableDict copy] to return it Do Riwartit. / html>

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -