weex icon indicating copy to clipboard operation
weex copied to clipboard

webview组件能不能自动横屏呢

Open solaronke opened this issue 9 years ago • 6 comments

webview 不是调用的自身的浏览器吗,自身的浏览器可以自动横屏的,怎么在app里嵌入的不行呢,已经把手机的竖排方向锁关闭了也还是不行,望解答哦。

solaronke avatar Mar 01 '17 08:03 solaronke

webview 不是调用的自身的浏览器,跳到第三方打开的写法才是。

zk0301 avatar Apr 18 '17 01:04 zk0301

@zk0301 就是想在app里打开的,可行不?是iOS的

solaronke avatar Apr 18 '17 01:04 solaronke

没看过ios sdk的源码,不知道跳转处理页面是不是wxpageActivity之类的。 还有其他的方法,js调用一个自定义的module,然后module再打开一个VC,这个VC是横屏的,里面有个webview空间。

zk0301 avatar Apr 18 '17 01:04 zk0301

横竖屏自己处理,和webview 没关系。 实现一下这几个方法:

  • (BOOL)shouldAutorotate;
  • (UIInterfaceOrientationMask)supportedInterfaceOrientations;
  • (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation;

likenow avatar May 01 '17 12:05 likenow

This PR/issue doesn't received response since Weex migrated to Apache two years ago and this repository is no longer active yet.

Feel free to ask question in new repository and thanks for your contribution.

YorkShen avatar Feb 18 '19 11:02 YorkShen

This issue is outdated for a long time and will be closed now. You can create a new one if you still have questions.

Hanks10100 avatar May 16 '21 10:05 Hanks10100