steipete / PSPDFTextView

A subclass of UITextView that fixes the most glaring problems from iOS 7 and 7.1.
http://pspdfkit.com
MIT License
873 stars 73 forks source link

Text bouncing #19

Open joonorbertsv opened 10 years ago

joonorbertsv commented 10 years ago

I am using it to enter multiline text, but when I have only one line, adding a new letter or deleting one causes the text to bounce. I am using V1.2.1.

Anyone else experiencing this?

jonathanng commented 10 years ago

+1

joonorbertsv commented 10 years ago

So I am using a constraint for the height of the text view, and I am using [self.textView sizeThatFits:self.textView.frame.size] to find the necessary height. It seems that somehow this is causing the bouncing, because the text would not fit in the visible rect. As a workaround, I added some extra height for the textView (setting the height constraint to [self.textView sizeThatFits:self.textView.frame.size].height + 2.0f) and the bouncing went away. I know, this is hacky, but couldn't come up with a better solution.

crazyjooe commented 9 years ago

This issue was fixed after pod version was locked, and it disappears, if referencing PSPDFTextView repository directly from Podfile:

pod 'PSPDFTextView', :git => 'https://github.com/steipete/PSPDFTextView.git'

It could be nice if pod version could be bumped.

crazyjooe commented 9 years ago

Another option is to use

pod 'PSPDFTextView', :head

to get latest pod and all latest changes