Dictionary of Objective-c explaining

Source: Internet
Author: User

We have learned from childhood, the dictionary has always been a good helper of our study, in OC the dictionary still has its irreplaceable role, and now we will go through her mysterious veil ...

Advantages of the Dictionary:

1. A dictionary is a collection of keywords and their corresponding values

2.NSDictionary stores a data under a given keyword, which can be any of the OC object types

3. The data in the dictionary always appears in pairs, all keys and values are pre-set and can only be found within this range

4. The corresponding data can be accessed by the keyword

Disadvantages of the Dictionary:

1. The output of the dictionary is unordered, so he cannot be sorted

2. A key can only correspond to a value, the contents of the search can only be pre-set;

Now the dictionary is explained in detail:

Now output the result of the operation:

Dictionary of Objective-c explaining

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.