0

我的應用程序正在處理Android和iPad設備中的所有旋轉,但是我的新iPhone 5s不支持水平旋轉。當iPhone水平旋轉時,它仍然是垂直的。對於我已經添加下面的代碼在我Tiapp.xml文件:我的iPhone 5s不適用於使用鈦合金的水平旋轉

<orientations device="iphone"> 
      <orientation>Ti.UI.PORTRAIT</orientation> 
      <orientation>Ti.UI.UPSIDE_PORTRAIT</orientation> 
      <orientation>Ti.UI.LANDSCAPE_LEFT</orientation> 
      <orientation>Ti.UI.LANDSCAPE_RIGHT</orientation> 
</orientations> 

而且,我也跟着按這個https://support.apple.com/en-us/HT204547鏈接描述,但它並沒有給我在我的新iPhone上運行

回答

1

你是使用已經被棄用並且可能已經很長時間已經被移除的配置方法。你可以找到目前的辦法來限制下列指南中的方向性模式:

http://docs.appcelerator.com/platform/latest/#!/guide/Orientation-section-29004932_Orientation-LimitingorientationmodesoniOS

+0

我試圖根據上面的鏈接,但它仍然不工作。 –

+0

你可以分享你的'tiapp.xml'的''部分,也許可以創建並上傳/鏈接一個小項目來證明這個問題? –

0

這是我的代碼,我有發生在Tiapp.xml文件中<ios> ... </IOS>部分

<ios> 
     <plist> 
      <dict> 
       <key>UISupportedInterfaceOrientations~iphone</key> 
       <array> 
        <string>UIInterfaceOrientationPortrait</string> 
       </array> 
       <key>UISupportedInterfaceOrientations~ipad</key> 
       <array> 
        <string>UIInterfaceOrientationPortrait</string> 
        <string>UIInterfaceOrientationPortraitUpsideDown</string> 
        <string>UIInterfaceOrientationLandscapeLeft</string> 
        <string>UIInterfaceOrientationLandscapeRight</string> 
       </array> 
      </dict> 
     </plist> 
    </ios> 

這是正確的嗎?
將此放置在Tiapp.xml中之後,仍然My iphone 5-s不處理水平旋轉。它保持垂直仍然處於水平模式。

+0

謝謝你prashant,它現在的工作 –

+0

這段代碼確實強制它僅適用於iPhone的肖像。 @prashant的代碼顯示瞭如何支持所有的方向。請注意,建議在來電時不要使用UIInterfaceOrientationPortraitUpsideDown來混淆用戶。 –

0
<ios> 
     <plist> 
      <dict> 
       <key>UISupportedInterfaceOrientations~iphone</key> 
       <array> 
        <string>UIInterfaceOrientationPortrait</string> 
        <string>UIInterfaceOrientationPortraitUpsideDown</string> 
        <string>UIInterfaceOrientationLandscapeLeft</string> 
        <string>UIInterfaceOrientationLandscapeRight</string> 
       </array> 
       <key>UISupportedInterfaceOrientations~ipad</key> 
       <array> 
        <string>UIInterfaceOrientationPortrait</string> 
        <string>UIInterfaceOrientationPortraitUpsideDown</string> 
        <string>UIInterfaceOrientationLandscapeLeft</string> 
        <string>UIInterfaceOrientationLandscapeRight</string> 
       </array> 
      </dict> 
     </plist> 
    </ios> 

使用上面的代碼&確保打開你的iPhone中的旋轉。