objc-simple-bindings 0.1.2

objc-simple-bindings 0.1.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Marcel Ruegenberg.



  • By
  • Marcel Ruegenberg

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.