Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Bind properties to a key path on another object
Objective-C C
Failed to load latest commit information.
Frameworks Initial check in of NSObject KeyPathBinding
KeyPathBindings.xcodeproj Renamed project and added MAZeroingWeakRef as a submodule
MAZeroingWeakRef @ 4082c7f Point to trunk on MAZeroingWeakRef
Source Revert "Overload class method to give the appearance that the object …
Specs Updated wording in spec
.gitignore Initial check in of NSObject KeyPathBinding
LICENSE Initial check in of NSObject KeyPathBinding Added link to blog post.


KeyPathBindings is a library for binding a property to a key path on another object. This can be particularly useful when you want a property on an object to mirror a property on another object. The library can optionally be configured with MAZeroingWeakRef to automatically zero bindings.

Note: This library subclasses observed objects -- which means already KVO'd objects will not work.


  @interface MySlider : NSObject
    CGFloat percentComplete

  @property(nonatomic, assign) CGFloat *percentComplete;


  [request bindProperty:@"percentComplete" onTarget:mySlider toKeyPath:@"percent"];

  request.percent = 0.54f;
  NSCAssert(mySlider.percentComplete == request.percent);


Something went wrong with that request. Please try again.