Fixes issue where cheats don’t wrap onto next line correctly
This commit is contained in:
parent
3e5ebc7c32
commit
7da6a5d8a5
@ -50,7 +50,9 @@ extension CheatTextView
|
|||||||
let characterWidth = ("A" as NSString).size(withAttributes: [.font: font]).width
|
let characterWidth = ("A" as NSString).size(withAttributes: [.font: font]).width
|
||||||
|
|
||||||
let width = characterWidth * CGFloat(format.format.count)
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user