Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text in internalTextView (when at max line) scrolls "beyond" textViewBackgroundImage #2

Open
wuf810 opened this issue May 29, 2011 · 3 comments

Comments

@wuf810
Copy link

wuf810 commented May 29, 2011

When enough text has been entered to cause the internalTextView to start scrolling, it's scroll area is larger than the textViewBackgroundImage

i.e.the appearance is that, the text is scrolling outside it's pseudo entry box. I assume it can be fixed by adjusting the contentSize property of the area

NB You can, probably should, set the scrollIndicatorInsets so they to appear within the "entry area" also

@wuf810
Copy link
Author

wuf810 commented May 29, 2011

So I fixed this by adding the following two line

         // fix for scrolling beyond background frame
        r.size.height -= 2;
        internalTextView.frame = r;

to

UIExpandingTextView.m, - (void)textViewDidChange:(UITextView *)textView , line 225

Seems to work for me. Basically it is resizing the UITextView's frame to just smaller than the textViewBackgroundImage frame

NB I'm also doing the following when initing the UIINputToolbar:

inputToolbar.textView.internalTextView.scrollIndicatorInsets = UIEdgeInsetsMake(4.0f, 0.0f, 4.0f, 0.0f);

@georgepiva
Copy link

I am facing the same problem here. @wuf810's workaround does not appear to work anymore. Did some of you guys find another solution for this case?
Here follows a screenshot of the problem:
http://postimage.org/image/5isr7z551/
Thanks in advance for any hints.

georgepiva referenced this issue in georgepiva/inputtoolbar Sep 6, 2012
@n-studio
Copy link

No merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants