glaszig / SZTextView

A drop-in UITextView replacement which gives you: a placeholder.
MIT License
683 stars 102 forks source link

Close #42 (incorrect intrinsicContentSize) #43

Closed michaelforrest closed 8 years ago

glaszig commented 9 years ago

forgive my ignorance but would you care to explain what the effects of this will be?

michaelforrest commented 9 years ago

If you use it with auto layout where the content sets its size, the label will collapse when only the placeholder text is visible. You can try this by adding one to a storyboard and only adding constraints to centre it horizontally and vertically. A UITextView will collapse to the size of its content. A SZTextView will be collapsed to a few pixels wide until content is entered, instead of expanding to accommodate the placeholder text.

glaszig commented 8 years ago

can't manage to replicate the described behavior. please create a demo project and reopen.