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
Remove KVO observer issue
I have a menu controller that connected with view controller over weak reference. View controller have srong reference to menu controller.
Menu controller observes some property of collection view in view controller.
When menu controller…

AlKozin
- 904
- 8
- 25
0
votes
3 answers
Best Practice: ListView - DetailView. Load more results
I am having a basic question for like best practise.
The setup:
ListViewController:
UiTableView with ManagedObjects. The objects will be loaded from a server.
First load 20 objects. Scroll to the end of the table, the next 20 objects will be…

marco
- 63
- 1
- 7
0
votes
3 answers
Need to call removeObserver twice
I have a view that observe values of itself on init like this :
[self addObserver:self forKeyPath:@"focusPointOfInterestIndicator" options:0 context:kSRCameraViewObserverContext];
[self addObserver:self forKeyPath:@"exposurePointOfInterestIndicator"…

Tancrede Chazallet
- 7,035
- 6
- 41
- 62
0
votes
1 answer
KVO notification not sent when using the super class' setter
I have a ClassA that defines a property:
@interface ClassA : NSObject
@property (nonatomic) CGPoint property;
@end
The implementation doesn't override the accessors.
ClassB overrides the setter to do some additional work:
-…

Jawap
- 2,463
- 3
- 28
- 46
0
votes
0 answers
Does Trigger iCloud Sync work with KVO on simulator
I'm trying to test with my simulator and real device, user-defaults modification via key-value storage in the iCloud.
Nothing is working but note that in [this][1] document
[1]:…

Fittoburst
- 2,215
- 2
- 21
- 33
0
votes
3 answers
retain sent to deallocated instance with KVO (EXC_BREAKPOINT)
I have this very strange error happening when I'm changing view controllers in my iOs app.
First some background info.
I am retrieving an image from the web in a background NSOperation. This operation is started from another (background) operation…

user1028028
- 6,323
- 9
- 34
- 59
0
votes
0 answers
How to use "context" in " observeValueForKeyPath:ofObject:change:context:"
Having read KVO guide, KVC guide, KVO protocol ref, I have never seen a solid example on how/when to use the last parameter of observeValueForKeyPath:ofObject:change:context:
the description on this "context" is so vague in Apple's document, so are…

J-Q
- 374
- 5
- 15
0
votes
1 answer
UITableViewCell copyWithZone unrecognized selector sent to instance
I am trying to update the values in my custom tableviewcell (DHtableViewCell) using KVO. I keep getting this error. I am aware that there are others that have this same exception, but their solutions do not help.
-[DHTableViewCell copyWithZone:]:…

DerrickHo328
- 4,664
- 7
- 29
- 50
0
votes
1 answer
Key value observation on discrete data derived from a continuous data
So I have two properties defined
@property (nonatomic) float continous;
@property (nonatomic, readonly) NSInteger discrete;
continous is an actual property that varies continously, while the getter for discrete looks like this:
-…

Enzo
- 969
- 1
- 8
- 23
0
votes
1 answer
An instance of class UITextField was deallocated while key value observers were still registered with it.
Hello i am getting this error
An instance 0x18872c0 of class UITextField was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a…

Suraj K Thomas
- 5,773
- 4
- 52
- 64
0
votes
2 answers
KVO, properties changes and notifications
I have a shared singleton that contains all relevant information on the current user and its session, through the object [IWSession session] and [IWSession session].currentUser.
The current user (which actually refers to the one logged in the…

Romain Dorange
- 831
- 1
- 10
- 23
0
votes
1 answer
NSCollectionView Master detail binding configuration
I have the following models in my application.
Board, holds a NSMutableArray property lists of type List below
List, holds a NSArray property cards of type Card below
Card, has a NSString property name
The relationship is thus Board --> to-many…

H.Rabiee
- 4,747
- 3
- 23
- 35
0
votes
1 answer
cashapelayer and catextlayer as sublayer
I'm working on an ios app which among other things contains of a scrollview with nodes and edges.
At first I used calayer and with key value observing for start and end nodes.
Is used the following code to draw the edge and edge label:
-…

freddy
- 394
- 1
- 5
- 19
0
votes
1 answer
What will happen if my implementation of an setXXX method that perform validation?
on Ensuring KVC Compliance
The document says:
Your implementation of the -set: method should not perform validation.
Your class should implement -validate:error: if validation is appropriate for the key.
So will happen if my…

ruandao
- 410
- 4
- 11
0
votes
2 answers
Observing changes of an NSArray in a UITableViewCell
I am using KVO to observe an array's changes, the array will be changed in a cell which is in a tableViewController's tableView. And I have assign the array which is in the cell to a public NSArray property for other view controllers to use, their…

vc7
- 23
- 1
- 7