Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
aka NSMutableArray+QueueAdditions
branch: master

Merge pull request #4 from csaftoiu/master

fix if arc is disabled, thanks to Claudiu on stack overflow. see the whole thread here: http://stackoverflow.com/questions/817469/how-do-i-make-and-use-a-queue-in-objective-c/936497
latest commit 68648a94b7
esromneb authored

README.md

Queue Object for iOS

This is a simple addition to NSMutableArray which gives you a queue object. Use enqueue and dequeue to manage your first-in-first-out queue. It can handle any kind of object.

I found this code floating around on the internet, by no means am I claiming it for myself!!

Example:

// add 3 objects
[q enqueue:@"object1"];
[q enqueue:@"object2"];
[q enqueue:@"object3"];

// print them
NSLog(@"%@", [q dequeue] );
NSLog(@"%@", [q dequeue] );
NSLog(@"%@", [q dequeue] );
Something went wrong with that request. Please try again.