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

横竖屏切换,弹幕会碰撞 #3

Open
xtcan opened this issue Aug 10, 2017 · 3 comments
Open

横竖屏切换,弹幕会碰撞 #3

xtcan opened this issue Aug 10, 2017 · 3 comments

Comments

@xtcan
Copy link

xtcan commented Aug 10, 2017

横屏的时候,出现大量弹幕,这时候切到竖屏,显示区变小了,弹幕就会覆盖。

@Wbqqqq
Copy link
Owner

Wbqqqq commented Aug 10, 2017

是的,暂时没想到好的方法,因为你从大的显示区域变成了小的区域,碰撞是难免的,之后会趋于正常。

@xtcan
Copy link
Author

xtcan commented Aug 10, 2017

我也没想到好的方法,看哔哩哔哩从横屏切到竖屏,排在前面的弹幕依然显示,排在后面的弹幕就会移到屏幕外,不会覆盖。西瓜视频就会覆盖在一起。
另外,我看大多的应用,弹幕区域的高度是固定的,竖屏的时候,区域高度就是视频区域高度,铺满。切到横屏,这个高度也还是原来的值,弹幕区域就不会铺满视频。这样处理,就不需要用到autolayout,直接处理frame性能更好。

@Wbqqqq
Copy link
Owner

Wbqqqq commented Aug 10, 2017

这个还是看你们app的具体需求 不用autolayout时,你的宽度也得重新赋值,否则也会有问题。

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