Skip to content
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.

_UITextContainerView's frame issue #110

Open
ghost opened this issue Feb 5, 2015 · 0 comments
Open

_UITextContainerView's frame issue #110

ghost opened this issue Feb 5, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 5, 2015

If I set maxNumberOfLines = 3, press return key on keyboard after line number grows to 2 will cause textview's _UITextContainerView frame issue.

for example, HPTextViewInternal's frame is {0,0,100,50} when I have two lines, it changes to {0,0,100,60} when I have three lines, but _UITextContainerView's frame is still {0,0,100,50}, it causes the UI issue. It looks like this:

img_0968

I look into the code, find that when this case happens, - (void)drawRect:(CGRect)rect of HPTextViewInternal will receive a rect's y point which has a negative value such -10,

After I change

if (newSizeH <= maxHeight)

in - (void)refreshHeight which in HPGrowingTextView.m to

if (newSizeH < maxHeight)

the precent of this case chance change from 100% to 10%,
Anyone can help? Please forgive my poor description.

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

No branches or pull requests

0 participants