Key-value Observing or KVO is a technology for observing changes in object properties.
Questions tagged [key-value-observing]
1201 questions
0
votes
1 answer
KVO - interface orientation property
I'm trying to observe interface orientation by KVO of UIViewController from other object by this code :
[((UIViewController *)self.delegate) addObserver:self forKeyPath:@"interfaceOrientation" options:NSKeyValueObservingOptionNew context:NULL];
and…

Rivka Schwartz
- 524
- 5
- 15
0
votes
2 answers
KVO mechanism throwing error?
I m implementing one photo edit app in which i have one camera captured image and one is output image which is i shown beside of captured image. Whenever i change my captured image scaling or rotation then i want notify this changes to outputImage.…

Tirth
- 7,801
- 9
- 55
- 88
0
votes
1 answer
Two-way KVO: controller updates model, which notifies controller
I'm currently re-writing a form controller for iOS. It's a custom object that is bound to a model, and handles editing form fields, jumping to the prev/next field, handling custom keyboards, validating data...
The first version was based on a plist…

Cyrille
- 25,014
- 12
- 67
- 90
0
votes
0 answers
scroll table view while shrinking upper UIImage
I don't know if the title of this post is much descriptive so I'll try to explain it in more depth. I have this UserProfileViewController:
The top part is an UIImage that has those buttons as subviews and also flips from side to side. The bottom…

alex
- 957
- 2
- 9
- 16
0
votes
1 answer
Observing custom cell
I am trying to add observer (KVO) to observe my custom cell. Once the cell is selected I should receive a notification of the event.
My code:
[colMain addObserver:self forKeyPath:@"colMain" options:0…

uml
- 1,171
- 4
- 16
- 28
0
votes
4 answers
Perform animations after one another, hit by KVO (after async URLRequest)
I want to insert UIViews dynamically with animation, based on incoming Data.
I send two asynchronous URLRequests and get the received data back from another thread.
I'm observing a property, which gets dynamically filled with data from different…

Fab1n
- 2,103
- 18
- 32
0
votes
1 answer
Which observer pattern should I use for remote app?
I am building a remote app which is receiving different states of its accessory. It is receiving things like: power state on/off, volume state 5, equalizer setting jazz, etc. and has nothing more to do than map theses states into the UI with…

d.ennis
- 3,445
- 2
- 28
- 36
0
votes
0 answers
Key-Value Observing an NSMutableArray within an NSMutableArray
Key-Value Observing the to-many relationship of an NSMutableArray seems like a good technique for automatically updating a tableview that has a single section and many rows. However, my table view is grouped and more naturally fits having an array,…

MaxGabriel
- 7,617
- 4
- 35
- 82
0
votes
1 answer
NSTextField does not update calculated property using Core Data bindings
New to SO; my first question:
Re: Core Data, document based app using bindings:
I have an NSTableView bound to an NSArrayController, bound to an entity, LineItem, with several columns bound to the following LineItem attributes/properties: amount,…

averageJoe
- 11
- 4
0
votes
2 answers
NSCollectionView implementation
I have looked at the documentation yet I still haven't successfully implemented a CollectionView. Here is what I have.
My KVO/KVC compliant NSMutableArray.
#import
#import "ProjectModel.h"
@interface KVOMutableArray :…

marcopolo
- 1,963
- 4
- 18
- 31
0
votes
2 answers
Previously posted solution to getting Notification (on NSOperationQueue finishing all tasks) is not working for me
Get notification when NSOperationQueue finishes all tasks
I have the same issue as the one posted by @porneL in the post above. I tried the solution posted by @NickForge (one that received 57 votes), but I am obviously doing it wrong because it does…

CoolDocMan
- 637
- 7
- 29
0
votes
1 answer
KVO questions in a data source
I have a UITableView with a data source of NewsItem objects that is stored in an array. In my NewsItem object I have a BOOL called 'imageState' that I wanted to be tracked. I wanted to use KVO such that when the value of this imageState changed then…

adit
- 32,574
- 72
- 229
- 373
0
votes
2 answers
Why is my observer unregistered?
I'm looking through my crash reports in TestFlight and the most frequent crash is:
Cannot remove an observer "ListViewController 0x1d590500" for the key path "batchImageDownloadingInProgress" from "ListArchiver 0x1d5b83b0" because it is not…

djibouti33
- 12,102
- 9
- 83
- 116
0
votes
1 answer
How should a virtual Core Data property be retained?
I have a NSManagedObject subclass with a virtual property which is expensive to calculate. The property depends on the value of one of the entity's concrete attributes. For performance reasons I only want to calculate the value of the virtual…

bluefloyd8
- 2,266
- 2
- 24
- 20
0
votes
1 answer
KVO - problem retrieving object from storage and displaying for edition
I've a problem with KVO and I just can't find out what it is.
I have a screen that can be used to edit or create a record. That record is represented by a model object that holds a number of variables of type NSString.
The controller for that string…

ruipacheco
- 15,025
- 19
- 82
- 138