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

YYTextView 竖排时,修改frame 之后,删除文字有bug。 #483

Closed
yfusong opened this issue Sep 3, 2016 · 3 comments
Closed

YYTextView 竖排时,修改frame 之后,删除文字有bug。 #483

yfusong opened this issue Sep 3, 2016 · 3 comments

Comments

@yfusong
Copy link

yfusong commented Sep 3, 2016

假设初始化的YYTextView 的frame 为frame1,修改textView的frame = frame2,运行时,运行之后在原有文字之上删除任意一个字符,YYTextView 会还原到frame1。

ibireme added a commit that referenced this issue Sep 13, 2016
@ibireme
Copy link
Owner

ibireme commented Sep 13, 2016

Fixed

@ibireme ibireme closed this as completed Sep 13, 2016
@yfusong
Copy link
Author

yfusong commented Sep 13, 2016

你又引入了新bug,而且很明显,具体就不描述了。问题代码如下:
在YYTextView 里面的setFrame 函数里
BOOL changed = _innerContainer.isVerticalForm ? CGSizeEqualToSize(oldSize, newSize) : (oldSize.width != newSize.width);
应该改成
BOOL changed = _innerContainer.isVerticalForm ? !CGSizeEqualToSize(oldSize, newSize) : (oldSize.width != newSize.width);
这句代码原来的也没有什么错,这里之前我也有看过,没有找到原因所以在才在这里问你。
不过更新了新版本之后,突然发现原来的bug好像是由自动布局引起的,和你的插件本身没有太大关系。
谢谢费心解答。

@ibireme
Copy link
Owner

ibireme commented Sep 13, 2016

啊抱歉,犯蠢了。。

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

2 participants