Skip to content

Commit

Permalink
Highlight Layer is sent to back when updated
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcyman-omicron committed Jul 20, 2018
1 parent b872e93 commit b6a0a96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/StyledTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ open class StyledTextView: UIView {

private func highlightIfNeeded() {
let path = UIBezierPath()
defer { highlightLayer.path = path.cgPath }
defer {
highlightLayer.path = path.cgPath
layer.insertSublayer(highlightLayer, at: 0)
}

guard let renderer = renderer else { return }

Expand Down

0 comments on commit b6a0a96

Please sign in to comment.