UITextView-Placeholder icon indicating copy to clipboard operation
UITextView-Placeholder copied to clipboard

if set contentInset ,the placeholder location does't start like input text .

Open tanpengsccd opened this issue 4 years ago • 1 comments

image code

text.contentInset = .init(top: 0, left: 20, bottom: 0, right: 20)

tanpengsccd avatar May 28 '20 06:05 tanpengsccd

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.

$0.textContainerInset = UIEdgeInsets(inset: 11)
$0.placeholder = ...

VincentSit avatar Jun 08 '20 09:06 VincentSit