Skip to content
This repository was archived by the owner on Aug 24, 2019. It is now read-only.

Re-draw placeholder when UITextView's layout or frame changes#9

Open
ikovalisko wants to merge 3 commits intosoffes:masterfrom
ikovalisko:master
Open

Re-draw placeholder when UITextView's layout or frame changes#9
ikovalisko wants to merge 3 commits intosoffes:masterfrom
ikovalisko:master

Conversation

@ikovalisko
Copy link
Copy Markdown

This happened to me when embedding textview into table view cell. In landscape mode it got stretched because of new frame.

This happened to me when embedding textview into table view cell. In landscape mode it got stretched because of new frame.
@mmorey
Copy link
Copy Markdown

mmorey commented Dec 29, 2013

👍 Fixes issue #3.

@thomassnielsen
Copy link
Copy Markdown

This doesn't seem to work properly when animating with layout constraints. The placeholder redraws stretched before the animation starts then becomes correct when the animation is done. I'm looking for another fix but haven't found one yet.

@rsanchezsaez
Copy link
Copy Markdown

I have the same problem when animating.

@conradev
Copy link
Copy Markdown

@thomassnielsen, @rsanchezsaez: that is the result of how CoreAnimation works. The model layer (self.layer) does not contain interpolated values. The presentation layer (self.presentationLayer) is the layer changing its frame.

One solution would be to use pop, which animates the model layer, but there are a number of side effects introduced by doing that.

@soffes
Copy link
Copy Markdown
Owner

soffes commented Aug 27, 2014

It would be better to just set the contentMode to redraw. Mind making that change?

@ikovalisko
Copy link
Copy Markdown
Author

Sure. Will come up a bit later today

@ikovalisko
Copy link
Copy Markdown
Author

Done. Please, have a look

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants