devxoul / UITextView-Placeholder

A missing placeholder for UITextView
MIT License
1.48k stars 259 forks source link

Mirror lineFragmentPadding fix issue with wrong insets in iOS 13 #67

Closed fl034 closed 5 years ago

fl034 commented 5 years ago

I was using below code to get zero padding for my UITextView

textView.textContainer.lineFragmentPadding = 0
textView.textContainerInset = .zero

Until iOS 12 I was fine. But with iOS 13 the placeholder got 5pt horizontal inset which is the default of lineFragmentPadding

My PR adds the mirroring of the given value into the internal placeholderTextView

devxoul commented 5 years ago

Thanks for your work! I'll add some tests and make a new release shortly :)

fl034 commented 5 years ago

Glad I could contribute. Thanks to you for this great project 🙌