Commit 692f91a1 by Dorin Danciu Committed by Dorin Danciu

Manually invalidate NSKeyValueObservation to prevent iOS 10 crash

parent d9dfb66c
...@@ -171,6 +171,14 @@ open class Editor: View, Themeable { ...@@ -171,6 +171,14 @@ open class Editor: View, Themeable {
*/ */
private var textViewTextObserver: NSKeyValueObservation! private var textViewTextObserver: NSKeyValueObservation!
deinit {
placeholderLabelTextObserver.invalidate()
placeholderLabelTextObserver = nil
textViewTextObserver.invalidate()
textViewTextObserver = nil
}
open override func prepare() { open override func prepare() {
super.prepare() super.prepare()
backgroundColor = nil backgroundColor = nil
......
...@@ -81,6 +81,11 @@ open class Toolbar: Bar, Themeable { ...@@ -81,6 +81,11 @@ open class Toolbar: Bar, Themeable {
} }
} }
deinit {
titleLabelTextAlignmentObserver.invalidate()
titleLabelTextAlignmentObserver = nil
}
/** /**
An initializer that initializes the object with a NSCoder object. An initializer that initializes the object with a NSCoder object.
- Parameter aDecoder: A NSCoder instance. - Parameter aDecoder: A NSCoder instance.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment