A simple bindings mechanism for Objective-C
Objective-C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.travis.yml
CMakeLists.txt
LICENSE
NSObject+SimpleBindings.h
NSObject+SimpleBindings.m
README.mdown
objc-simple-bindings.podspec

README.mdown

Simple Objective-C bindings

This is a simple bindings-like mechanism somewhat similar to Cocoa Bindings.

It was originally intended to make the lack of Cocoa Bindings on iOS less painful, but has somewhat different semantics and expanded functionality when compared to its ancestor.

What is in here

A category for NSObject to allow for seamless usage of bindings for all its subclasses.

Requirements

  • A compiler and SDK that allow the usage of Objective-C blocks. If you build your app for iOS 4 and above, this is the case.
  • Internally, key-value coding and key-value observing (KVC/KVO) is used

Status

This code is still very much in beta.

Note

It is important to correctly release bindings. Otherwise, observers might be leaked and bad things may happen. In general, if you call a bind method on an object, A, the binding is automatically removed as soon as A is deallocated. If you bound a property on A to a property on B, try to ensure that B is not deallocated before A.

In particular, unforeseen situations may arise when using blocks, which implicitly retain variables.

License

See LICENSE.

Contact

Travis CI build status

Bug reports and pull requests are welcome! Contact me via e-mail or just by opening an issue on GitHub.