From 7da6a5d8a51dc0472d8cfb4e3de3eb3f73ef2b08 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Tue, 30 Apr 2019 15:10:07 -0700 Subject: [PATCH] =?UTF-8?q?Fixes=20issue=20where=20cheats=20don=E2=80=99t?= =?UTF-8?q?=20wrap=20onto=20next=20line=20correctly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Delta/Pause Menu/Cheats/CheatTextView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Delta/Pause Menu/Cheats/CheatTextView.swift b/Delta/Pause Menu/Cheats/CheatTextView.swift index 918b9d8..d545c9c 100644 --- a/Delta/Pause Menu/Cheats/CheatTextView.swift +++ b/Delta/Pause Menu/Cheats/CheatTextView.swift @@ -50,7 +50,9 @@ extension CheatTextView let characterWidth = ("A" as NSString).size(withAttributes: [.font: font]).width let width = characterWidth * CGFloat(format.format.count) - self.textContainer.size = CGSize(width: width, height: 0) + + let adjustedInset = (self.bounds.width - self.textContainerInset.left) - width + self.textContainerInset.right = adjustedInset } } }