Fork me on GitHub

NSTimer+JCSBlocks

An extension to NSTimer that allows you to pass a block to handle timer events instead of using a callback method.

There are two methods; one which lets you fires an optionally repeating timer with a block, and another which lets you fire a timer repeatedly, but which can be stopped from within the passed block.

Dependencies

There is no memory management code in this extension, so it will work on Mac OS and iOS whether you are using Manual Reference Counting, ARC or Garbage Collection in your project.

Documentation

Documentation is generated from the code by appledoc and is available online here.

Branch structure for submodules

There are two branches to this repository, master and demo. If you just want to use the class extension, the master branch is the one you should be using.

The master Branch

The master branch just contains the class files and this README file. This is the branch to use if you are installing the class files as a Git submodule. As submodules are added in a headless state it is often preferable to explicitly state the branch you are cloning. So this is the command I recommend you use:

git submodule add -b master https://github.com/Abizern/NSTimer-JCSBlocks

The demo Branch

the demo branch contains a very simple example of the use of this class extension. No development of the main files should be done on that branch.

Changes made to the master branch will be merged across to demo, so it should always remain current with respect to master.

Updates

To keep up to date with the latest changes `cd` into the directory that contains this submodule and pull the newest changes as usual

git pull origin

Artefacts

Sometimes, there may be artefacts left over when switching from master to production. These are files that are ignored by Git and are easily cleaned up by running

git clean -dxf

Install

Clone the master branch

License

MIT Licence

Authors

Abizer Nasir (abizer@junglecandy.com)

Download

You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/Abizern/NSTimer-JCSBlocks

"