andrewsardone + kvo   8

Using -rac_valuesAndChangesForKeyPath:options:observer: with -mutableArrayValueForKey:
A periodic reminder to manimuplate collections (like NSArray) through the proxy returned by -mutableArrayValueForKey:. That way, you'll get granular KVO notifications for changes, and then in Reactive Cocoa land you can get a signal for those changes via -rac_valuesAndChangesForKeyPath:options:observer:
kvo  cocoa  objective-c  ReactiveCocoa  NSArray 
march 2014 by andrewsardone
Drop-in compile-time key paths via a macro
From the guys at Square, it's a similar strategy to what the [extobjc] guys use. Something like this should be included in every project. It definitely beats plain old NSStrings or the NSStringFromSelector strategy as noted by [NSHipster].

kvo  kvc  objective-c  cocoa  macro 
january 2014 by andrewsardone
ReactiveLessons - Tony Arnold
If you're only interested in using ReactiveCocoa as a simple replacement for KVO, there you go. "Bam" said the lady.
kvo  ReactiveCocoa  frp 
november 2013 by andrewsardone
Key-Value Observing for the mainstream | Damien DeVille
Clarifies some errors in the NSHipster post on [key-value observing][nh]. These nuances of the KVO API should be all the more reason to use something like [THObserversAndBinders]

kvo  cocoa 
october 2013 by andrewsardone
Chris Eidhof | Lightweight Key-Value Observing
A good example of encapsulating a lot of the boilerplate and awkwardness around Cocoa's key-value observing API inside of a simple Observer object. This Observer object can handle registration and removal of observers, as well as provide a more target-action-like dispatch system.

A reminder that [THObserversAndBinders][thoab] is a good implementation of this pattern, and probably a go-to requirement for any app that's taking advantage of KVO.

kvo  objective-c  cocoa  oop  encapsulation 
october 2013 by andrewsardone
KVO change wrapper
A simple wrapper object for the change dictionary of key-value observing events.
kvo  objective-c  kvc  ios 
june 2013 by andrewsardone
Formotion – RubyMotion
Declaratively construct UITableView-based forms/UI with a Hash or DSL. This really takes away the pain of writing boilerplate table view code by allowing you to define the structure of your UI and bind its values to model values.
rubymotion  uikit  uitableview  dsl  kvo  bindings 
december 2012 by andrewsardone
th-in-gs/THObserversAndBinders · GitHub
Easy, lightweight, object-based key-value observing (KVO) and key-value binding (KVB) for iOS and Mac OS X.

Observing and binding is built-up via simple and well-encapsulated objects, THObserver and THBinder. You simply declare the observed object/keypath and hand the THObserver/THBinder a block of code (with options) or NSValueTransformer that's executed upon observable events.

THObserver *observer = [THObserver observerForObject:object keyPath:@"propertyToObserve" block:^{
NSLog(@"propertyToObserve changed, is now %@", object.propertyToObserve);
cocoa  kvo  objective-c  ios  bindings  github_repo 
december 2012 by andrewsardone

Copy this bookmark: