devxoul / UITextView-Placeholder

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

exclusionPaths problem #48

Closed polonez closed 6 years ago

polonez commented 6 years ago

When using exclusionPaths of textContainer like textView.textContainer.exclusionPaths = [UIBezierPath(rect: CGRect(x: 0, y: 0, width: 70, height: 30))] then the placeholder label is not excluded.

One possible solution is replacing placeholderLabel to placeholderTextView and apply exclusionPaths to placeholderTextView as same as its superview(UITextView).

If above solution seems ok, then I will work on.

devxoul commented 6 years ago

@polonez Thanks for reporting! I could reproduce the bug. I think your solution could work. Would you make a PR?

screen shot 2018-05-21 at 4 22 50 am