Commit 692f91a1 by Dorin Danciu Committed by Dorin Danciu

Manually invalidate NSKeyValueObservation to prevent iOS 10 crash

parent d9dfb66c
......@@ -170,7 +170,15 @@ open class Editor: View, Themeable {
Only observes programmatic changes.
*/
private var textViewTextObserver: NSKeyValueObservation!
deinit {
placeholderLabelTextObserver.invalidate()
placeholderLabelTextObserver = nil
textViewTextObserver.invalidate()
textViewTextObserver = nil
}
open override func prepare() {
super.prepare()
backgroundColor = nil
......
......@@ -80,7 +80,12 @@ open class Toolbar: Bar, Themeable {
prepareIconButtons(rightViews)
}
}
deinit {
titleLabelTextAlignmentObserver.invalidate()
titleLabelTextAlignmentObserver = nil
}
/**
An initializer that initializes the object with a NSCoder object.
- 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