-
Notifications
You must be signed in to change notification settings - Fork 121
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
横竖屏问题 #8
Comments
@Z-DDong 当时考虑到了这个问题,其实在 EBBannerViewController.h 里面已经提供了,但是没有放进 public,我改一下 |
@Z-DDong 已经在 1.0.5 版本更新了,你 pod repo update 一下,再 pod install 应该就可以了 |
@pikacode 我更新了,但是我应该在哪里设置只显示竖屏的呢。。sharedWindow还是两个方向都支持。 |
@Z-DDong 你看下 EBBannerViewController.h |
|
@pikacode 这种方式有点奇怪。。。这段代码要放在show之后 |
@pikacode 可以了,非常感谢,之前暴力的直接把sharedWindow的方向直接改成竖屏,哈哈 |
@Z-DDong 因为有的 app 可能在某些页面支持全屏,某些页面只支持竖屏,可以用这个方法适配不通的情况 |
@Z-DDong 这段代码应该不用特定放在 show 之后 |
@pikacode 大大,还有坑!!我设置竖屏后,show弹窗,接着present到一个横屏的界面,弹出来的键盘是竖的,感觉和你那个window有关 |
@Z-DDong 你可以确认一下你是用哪个 controller present 的,不要使用 EBBannerViewController,或者确认一下 keywindow 是哪个,或者在 present 到横屏截面之前,用上面提到的方法把 EBBannerViewController 也设置成横屏 |
@pikacode controller是我的,keywindow也不是EBBannerWindow,如果present前设置横屏,dismiss又要设置竖屏。。侵入性太强了 |
@Z-DDong 只需要在 banner 的 show 之前设置竖屏,present 之前设置横屏。另外你的问题不用这个库也会出现吗,你是否确认是因为用了这个 banner 引起的?如果是的,我会在有空的时候写个 demo 测试一下你说的问题。 |
是的,用了这个库才有问题的。我直接在你demo上改的,SystemStyleViewController固定竖屏,show banner,self present一个横屏的,加个textField看下键盘,有空帮我看看哈~谢谢 |
大神6666. 膜拜一下 |
可否暴露一个支持横竖屏的方法,出现弹窗后页面状态栏就会滑动,但是需求不能滑
sharedWindow.m里面
[EBBannerViewController setSupportedInterfaceOrientations:UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscape];
默认横竖屏都支持
The text was updated successfully, but these errors were encountered: