Top "Key-value-observing" questions

Key-value Observing or KVO is a technology for observing changes in object properties.

How listen for UIButton state change?

I'm extending UIButton with generic functionality to change certain appearance attributes based on the displayed title. In order to do …

iphone objective-c cocoa-touch uibutton key-value-observing
An -observeValueForKeyPath:ofObject:change:context: message was received but not handled

I am relatively new to KVO, so there is a good chance that I am violating some fundamental rule. I …

iphone key-value-observing nsexception
KVO vs NSNotification vs protocol/delegates?

I have some idea of which to use when but the exact usage is still not clear to me. Can …

iphone ios protocols key-value-observing nsnotifications
KVO and ARC how to removeObserver

How do you remove an observer from an object under ARC? Do we just add the observer and forget about …

ios cocoa-touch key-value-observing automatic-ref-counting
Sorting with sortedArrayUsingDescriptors and Key Paths

I have an unordered array with instances of the following class: @interface Place : NSObject { } @property (nonatomic, copy) NSString *country; @property (…

objective-c cocoa sorting key-value-observing nssortdescriptor
Swift 4 approach for observeValue(forKeyPath:...)

I've been trying to find an example, but what I've seen doesn't work in my case. What would be the …

swift swift4 key-value-observing keypaths
Objective C:Object Deallocated while key value observers were still registered with it

I am hitting the below error after I added 2 additional fields to my core data model. CarPark_CarPark_ was deallocated …

objective-c ios core-data key-value-observing
iPhone KVO between two classes

I have two classes in my app class A and Class B. Both class A and B are instances of …

iphone ios key-value-observing
Adding observer for KVO without pointers using Swift

In Objective-C, I would normally use something like this: static NSString *kViewTransformChanged = @"view transform changed"; // or static const void *kViewTransformChanged = &…

pointers swift key-value-observing
Checking if a value is changed using KVO in Swift 3

I would like to know when a set of properties of a Swift object changes. Previously, I had implemented this …

swift swift3 key-value-observing