Top "Key-value-observing" questions

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

How to use KVO for UserDefaults in Swift?

I'm rewriting parts of an app, and found this code: fileprivate let defaults = UserDefaults.standard func storeValue(_ value: AnyObject, forKey …

ios swift key-value-observing foundation
Key Value Observing in Cocoa, introspecting the change property

I'm using key value observing on a boolean property an NSObject method: -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object …

objective-c cocoa key-value-observing
Key-Value-Observing a to-many relationship in Cocoa

I am trying to get key-value-observing to work for an NSMutableArray. Below is the .h file for MyObservee, the observed …

cocoa key-value-observing key-value-coding
How do I find all the property keys of a KVC compliant Objective-C object?

Is there a method that returns all the keys for an object conforming to the NSKeyValueCoding protocol? Something along the …

objective-c cocoa properties introspection key-value-observing
adding KVO to UITableViewCell

I have a custom UITableViewCell which is displaying various attributes of a Person object (backed by Core Data) ... some labels, …

objective-c core-data uitableview key-value-observing
In Swift 4, how do I remove a block-based KVO observer?

If I store an observer like this: let observer: NSKeyValueObservation = foo.observe(\.value, options: [.new]) { (foo, change) in print(change.…

swift key-value-observing swift4
KVO Notifications for a Modification of an NSArray backed by a NSMutableArray

I am trying to use KVO to listen to collection change events on an NSArray property. Publicly, the property is …

ios objective-c ios7 nsarray key-value-observing
Parameters from observeValueForKeyPath:ofObject:change:context:

I was wondering what the parameters from this method would return. - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(…

objective-c cocoa parameters key-value-observing
How to observe array property changes in RxSwift

Here is my class: class ViewController: UIViewController { var myArray : NSArray! } I want to fire an event every time myArray points …

swift key-value-observing rx-swift
KVO and NSMutableArray

How can I set KVO (key-value-observing) with an NSMutableArray? I want to be notified when a change appears in the …

objective-c cocoa key-value-observing