开发者

iOS SDK standard collections

开发者 https://www.devze.com 2023-01-20 08:55 出处:网络
I\'m new to objective-c. I can\'t find such classed as NSStack, NSList and so on. But i need containers to write the applicat开发者_开发知识库ion. The only containers i\'ve found are NSArray and NSMut

I'm new to objective-c. I can't find such classed as NSStack, NSList and so on. But i need containers to write the applicat开发者_开发知识库ion. The only containers i've found are NSArray and NSMutableArray. I know that i can use STL containers, but i'm not sure it's the best way.


For lists, you can use NSArray, NSMutableArray. For dictionary/hashmap, you can use NSDictionary, NSHashMap. For sets, you can use NSSet, NSMutableSet.

Here's Apple documentation on collections.

As you previously mentioned, you can also use C or C++ standard libraries, but do keep in mind that for storing Objective-C classes, it will be more convenient to use Objective-C native collections.

0

精彩评论

暂无评论...
验证码 换一张
取 消