Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
692f91a1
Commit
692f91a1
authored
Oct 22, 2018
by
Dorin Danciu
Committed by
Dorin Danciu
Oct 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Manually invalidate NSKeyValueObservation to prevent iOS 10 crash
parent
d9dfb66c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
Sources/iOS/Editor.swift
+9
-1
Sources/iOS/Toolbar.swift
+6
-1
No files found.
Sources/iOS/Editor.swift
View file @
692f91a1
...
@@ -170,7 +170,15 @@ open class Editor: View, Themeable {
...
@@ -170,7 +170,15 @@ open class Editor: View, Themeable {
Only observes programmatic changes.
Only observes programmatic changes.
*/
*/
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
...
...
Sources/iOS/Toolbar.swift
View file @
692f91a1
...
@@ -80,7 +80,12 @@ open class Toolbar: Bar, Themeable {
...
@@ -80,7 +80,12 @@ open class Toolbar: Bar, Themeable {
prepareIconButtons
(
rightViews
)
prepareIconButtons
(
rightViews
)
}
}
}
}
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment