Giter Club home page Giter Club logo

ordereddictionary's Introduction

Purpose

The order of objects stored in an NSDictionary is undefined. Often it is useful to be able to loop through a set of key/value pairs and have the objects returned in the order in which they were inserted. This library provides two classes, OrderedDictionary and MutableOrderedDictionary that implement that behaviour.

Supported OS & SDK Versions

  • Supported build target - iOS 7.0 / Mac OS 10.8 (Xcode 5.0, Apple LLVM compiler 5.0)
  • Earliest supported deployment target - iOS 5.0 / Mac OS 10.7
  • Earliest compatible deployment target - iOS 4.3 / Mac OS 10.6

NOTE: 'Supported' means that the library has been tested with this version. 'Compatible' means that the library should work on this OS version (i.e. it doesn't rely on any unavailable SDK features) but is no longer being tested for compatibility and may require tweaking or bug fixes to run correctly.

ARC Compatibility

OrderedDictionary requires ARC. If you wish to use OrderedDictionary in a non-ARC project, just add the -fobjc-arc compiler flag to the OrderedDictionary.m class. To do this, go to the Build Phases tab in your target settings, open the Compile Sources group, double-click OrderedDictionary.m in the list and type -fobjc-arc into the popover.

If you wish to convert your whole project to ARC, comment out the #error line in OrderedDictionary.m, then run the Edit > Refactor > Convert to Objective-C ARC... tool in Xcode and make sure all files that you wish to use ARC for (including OrderedDictionary.m) are checked.

Thread Safety

Access to an OrderedDictionary is inherently thread safe because it is immutable. Access to a MutableOrderedDictionary is not thread safe unless you ensure that no thread attempts to read from the dictionary whilst another is writing to it.

Installation

To install OrderedDictionary into your app, drag the OrderedDictionary.h and .m files into your project.

ordereddictionary's People

Contributors

nicklockwood avatar

Watchers

Jorge L Chao avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.