Open tanpengsccd opened 4 years ago
code
text.contentInset = .init(top: 0, left: 20, bottom: 0, right: 20)
https://github.com/devxoul/UITextView-Placeholder/blob/5a133b7efc4e8dd9de91c9eada48270d90c83ef0/Sources/UITextView%2BPlaceholder.m#L201
The code above shows that you need to use textContainerInset instead of contentInset.
textContainerInset
contentInset
$0.textContainerInset = UIEdgeInsets(inset: 11) $0.placeholder = ...
code