From d19379347369a02841847babf983d36ed7127d81 Mon Sep 17 00:00:00 2001 From: Mohamed El-Sawy <31069080+ElSawyMohamed@users.noreply.github.com> Date: Thu, 23 Jun 2022 10:16:54 +0200 Subject: [PATCH] Update SwiftyTextView.swift --- Sources/SwiftyTextView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SwiftyTextView.swift b/Sources/SwiftyTextView.swift index ba35a14..4cecd33 100755 --- a/Sources/SwiftyTextView.swift +++ b/Sources/SwiftyTextView.swift @@ -120,7 +120,7 @@ public class SwiftyTextView: UITextView { countdownTextLayer.string = "\(minNumberOfWords)/\(maxNumberOfWords)" layer.addSublayer(countdownTextLayer) } - countdownTextLayer.frame.origin = CGPoint(x: bounds.size.width - countdownTextLayer.bounds.size.width, y: bounds.size.height - countdownTextLayer.bounds.size.height + contentOffset.y) + countdownTextLayer.frame.origin = CGPoint(x: (bounds.size.width - countdownTextLayer.bounds.size.width) - 10, y: (bounds.size.height - countdownTextLayer.bounds.size.height + contentOffset.y) - 4) } delegate?.textViewDidChange?(self) }