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

问题:提供属性:屏幕旋转时 ActionSheet 自动隐藏,默认不自动隐藏 #35

Closed
cochat opened this issue Apr 24, 2017 · 8 comments

Comments

@cochat
Copy link

cochat commented Apr 24, 2017

还有就是能提供一个配置,旋转屏幕自动隐藏掉的功能吗?微信是这样做的

@iTofu
Copy link
Owner

iTofu commented Apr 24, 2017

这个需求其实在 UIViewController 中非常容易实现,在 viewWillLayoutSubviews 方法中隐藏即可……框架也可以实现,等我手上工作松一点可以考虑加上。
另外微信这样做我不认为是一个 Feature,而是一个解决 Bug 的方案。微信的 ActionSheet 在之前的版本中有一个 Bug,转屏后不会重新渲染布局,比如竖屏下 show,旋转到横屏,ActionSheet 并没有横向拓展,而是占了屏幕左半部分,后面的版本中我发现微信改成了转屏时 hide ActionSheet。
这是一个有趣的事情。

@iTofu iTofu added the TODO label Apr 24, 2017
@iTofu
Copy link
Owner

iTofu commented Apr 24, 2017

又捕捉到一次……见下图:
wechatimg74

@cochat
Copy link
Author

cochat commented Apr 24, 2017

厉害!!!

@iTofu
Copy link
Owner

iTofu commented Apr 24, 2017

正常的样式应该是这样的:

wechatimg75

当然并不是说微信的工程师不会写布局……而是这确实是有 Bug 的,interesting……

@iTofu
Copy link
Owner

iTofu commented Apr 24, 2017

所以当前至少我们这个横竖屏不会出 Bug,因为是 AutoLayout…… 不过这个需求我有空加上了再@你吧。

@cochat
Copy link
Author

cochat commented Apr 24, 2017

好的,多谢。。。

@iTofu iTofu changed the title 问题 问题:提供属性:屏幕旋转时 ActionSheet 自动隐藏,默认不自动隐藏 Apr 26, 2017
iTofu added a commit that referenced this issue Apr 26, 2017
@iTofu
Copy link
Owner

iTofu commented Apr 26, 2017

已实现该需求,见 V 3.1.0

@iTofu
Copy link
Owner

iTofu commented May 31, 2017

Done.

@iTofu iTofu closed this as completed May 31, 2017
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