Skip to content

Commit

Permalink
Merge pull request #5 from AlexSmet/blur_problem
Browse files Browse the repository at this point in the history
Fixed blur problem
  • Loading branch information
AlexSmet authored Dec 13, 2018
2 parents dca9f0c + e1ba07c commit 6470717
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NumberScrollAnimatedView/NumberScrollableColumn.swift
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class NumberScrollableColumn {

private func createContent(nonNumericalSymbol: Character) {
let textLayer = createTextLayer(withText: String(nonNumericalSymbol))
textLayer.contentsScale = UIScreen.main.scale
textLayer.frame = CGRect(x: 0, y: 0, width: scrollLayer.frame.width, height: scrollLayer.frame.height)
scrollLayer.addSublayer(textLayer)
}
Expand Down Expand Up @@ -178,6 +179,7 @@ class NumberScrollableColumn {

private func createTextLayer(withText: String) -> VerticallyCenteredTextLayer {
let newLayer = VerticallyCenteredTextLayer()
newLayer.contentsScale = UIScreen.main.scale

#if swift(>=4.2)
let attributedString = NSAttributedString( string: withText, attributes: [ NSAttributedString.Key.foregroundColor: textColor.cgColor, NSAttributedString.Key.font: font])
Expand Down

0 comments on commit 6470717

Please sign in to comment.