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.
- 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
This code is still very much in beta.
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.
Bug reports and pull requests are welcome! Contact me via e-mail or just by opening an issue on GitHub.