Skip to content

Commit 6bf216f

Browse files
committed
update for Swift 1.2
1 parent d1bce42 commit 6bf216f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bk1ch13p380kvo/ch13p355kvo/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class AppDelegate : UIResponder, UIApplicationDelegate {
4545
objectB = MyClass2()
4646
let opts : NSKeyValueObservingOptions = .New | .Old
4747
objectA.addObserver(objectB, forKeyPath: "value", options: opts, context: &con)
48-
(objectA as MyClass1).value = true
48+
(objectA as! MyClass1).value = true
4949
// comment out next line if you wish to crash
5050
objectA.removeObserver(objectB, forKeyPath: "value")
5151
objectA = nil

0 commit comments

Comments
 (0)