cordova - iOS应用程序中的ionic 3屏幕方向问题

标签 cordova ionic2 cordova-plugins ionic3

我想将我的一个页面锁定为横向模式,它在 Android 中完美运行,但在 Ios 中则不然,我无法旋转到横向模式,但它仍然处于纵向模式。我需要更改 Xcode 设置中的任何内容吗?我不知道到底发生了什么。

我用过这样的东西

ionViewDidLoad() {
 this.screenOrientation.lock('landscape');
}

最佳答案

您需要在 Xcode 中启用它。在常规选项卡中,查找部署信息,然后选中Landscape LeftLandscape Right复选框:

enter image description here

关于cordova - iOS应用程序中的ionic 3屏幕方向问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44302668/

相关文章:

android - Cordova 地理定位插件不起作用

ionic-framework - switchToLocationSettings()后如何检测gps是否启用?

android - 使用 Gradle 在 processDebugResources 上 ionic 构建错误

cordova - PhoneGap-构建错误

html - ionic 2 : Hide scroll-bar and keep scrolling

php - ionic 2 : marge details with same values

cordova - Ionic-Firebase 应用程序错误 : Cannot find module '../plugman/platforms/ios'

javascript - Ionic2 本地通知不播放自定义歌曲

angular - ionic 2 : How to use ViewChild instead of app. getComponent

android - 动态创建 Cordova 构建(Android 和 iOS)