Questions tagged [kvocontroller]

Simple, modern, thread-safe key-value observing for iOS and OS X.

10 questions
2
votes
0 answers

Swift variant of (FB)KVOController

I'd like to attempt to migrate/reimplement my app to Swift. I've done some tutorials and examples and want to try a "real" app now. My current app uses the KVOController cocoapod quite a bit though. So I'm looking for something (preferably as a pod)…
Travis Griggs
  • 21,522
  • 19
  • 91
  • 167
1
vote
1 answer

How to add KVO to synchronized class?

In my app I have the Restaurant class that you can see below. I'd like to attach a KVOController to it. But I'm having no luck. When I attach it with the code below, it crashes. FBKVOController *KVOController = [FBKVOController…
user4992124
  • 1,574
  • 1
  • 17
  • 35
1
vote
0 answers

How to observe torchLevel in swift?

How do I observe torchLevel? I have done the following from objective c solutions, no success: private var torchLevel = 0 let device = AVCaptureDevice.defaultDeviceWithMediaType(AVMediaTypeVideo) device.addObserver(self, forKeyPath:…
Justin
  • 717
  • 1
  • 9
  • 15
1
vote
1 answer

KVO in iOS in multiple classes and its context

Hi there I'm using KVO to observe AvPlayer states, i am using instances of AVPlayer in different controllers, and observing them usign KVO.(Ex home controller has player and its observers and category controller has player and its observers, etc). I…
Aragunz
  • 511
  • 5
  • 18
0
votes
1 answer

Why will app crash if did not remove KVO observer before dealloc?

I understand we need to remove KVO observe before instance dealloc. But Why would this crash happen?
Randall Wang
  • 1,007
  • 3
  • 10
  • 24
0
votes
0 answers

Observing AVPlayer: An -observeValueForKeyPath:ofObject:change:context: message was received but not handled

Hi I'm trying to observe an AVPlayerItem and an AVPlayer in my UIViewController. But I got some trouble doing it. I've googled a lot and found lot's of examples but none of these worked for me. Here is my ViewController: class…
Ichor de Dionysos
  • 1,107
  • 1
  • 8
  • 30
0
votes
1 answer

Send NSNotification in observeValueForKeyPath

I have a AVPlayer with a rate observer. [self.player addObserver:self forKeyPath:@"rate" options:NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew …
Peter
  • 1,053
  • 13
  • 29
0
votes
2 answers

KVO on mutable array of custom objects properties

I understand that it may be a duplicate question, but when i tried i am not getting the changed properties. I followed couple of KVO + Array SO answers. However I still missing some bits as its not working in my case. User.h: @interface User :…
SaffronState
  • 329
  • 1
  • 12
0
votes
0 answers

KVO on NSObject not working for some reason

I'm trying to implement KVOController in my app. I managed to get it working on custom UISliders, but I can't seem to get it working on a custom NSObject. This is the object: Restaurant.h #import @interface Restaurant :…
user4992124
  • 1,574
  • 1
  • 17
  • 35
0
votes
1 answer

Objective C KVO, NSLog New + Old values

I have: - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(Player *)object change:(NSDictionary *)change context:(void *)context { switch…