ios - SWIFT - KVO in xcode 6 beta 6.. observeValueForKeyPath no longer called -
i have been debugging app beta 3 beta 6
i cannot seem observevalueforkeypath called.. put breakpoint @ top of function , nothing happens
self.gamescene.viewcontroller.joystick.addobserver(self, forkeypath: "relativeposition", options: .new, context: nil) override func observevalueforkeypath(keypath: string!, ofobject object: anyobject!, change: [nsobject : anyobject]!, context: unsafemutablepointer<void>) { if keypath == "relativeposition" { // code here } } this code working without hitch before.. has changed? can't work in more basic app.. there else need do?
a property has have word "dynamic" in front of observable now..
dynamic var relativeposition: cgpoint = cgpointzero
Comments
Post a Comment