Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25942

iOS 11: Screen orientation not working in navigation window

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 7.5.0
    • Component/s: iOS
    • Labels:
    • Environment:

      iOS, Screen Orientation, Navigation window

    • Story Points:
      13
    • Sprint:
      2018 Sprint 11 SDK, 2018 Sprint 12 SDK, 2018 Sprint 13 SDK, 2018 Sprint 14 SDK, 2018 Sprint 15 SDK, 2018 Sprint 16 SDK, 2016 Sprint 17 SDK, 2018 Sprint 18 SDK, 2018 Sprint 19 SDK, 2018 Sprint 20 SDK

      Description

      Hello,

      We are seeing a screen orientation problem as windows are being open from a root navigation modal window.

      Steps to reproduce:

      1. Open the sample application in link or use the below-provided code.
      2. Run the application in an iOS simulator using below code Or
      3. Run the sample application in the simulator.
      4. Switch the simulator's device orientation to "UPSIDE DOWN"
      5. Click on the link on the main app screen labeled "Launch Nav Root Window"
      6. Once the window titled "Modal 1" window is opened, then click the "Next" nav button
      7. The window titled "Modal 2" should not have the correct orientation.

      Test Code:
      index.xml

      <Alloy>
      	<Window class="container" backgroundColor="#666600">
      		<Button onClick="launchNavRoot">Launch Nav Root Window</Button>
      	</Window>
      </Alloy>
      

      Modal1.xml, Modal3.xml, Modal3.xml, Modal4.xml, Modal5.xml

      //Modal1.xml
      <Alloy>
      	<NavigationWindow>
      		<Window backgroundColor="#808000">
      			<RightNavButton>
      				<Button title="Next" onClick="onNext"/>
      			</RightNavButton>
      			
      			<View layout="vertical">
      				<Label text="MODAL 1"></Label>
      				<Label text="MODAL 1"></Label>
      				<Label text="MODAL 1"></Label>
      				<Label text="MODAL 1"></Label>
      			</View>
      		</Window>
      	</NavigationWindow>
      </Alloy>
      //Modal2.xml
      <Alloy>
      	<Window backgroundColor="#999900">
      			<RightNavButton>
      				<Button title="Next" onClick="onNext"/>
      			</RightNavButton>
      			
      			<View layout="vertical">
      				<Label text="MODAL 2"></Label>
      				<Label text="MODAL 2"></Label>
      				<Label text="MODAL 2"></Label>
      				<Label text="MODAL 2"></Label>
      			</View>
      		</Window>
      </Alloy>
      //Modal3.xml
      <Alloy>
      	<Window backgroundColor="#b3b300">
      			<RightNavButton>
      				<Button title="Next" onClick="onNext"/>
      			</RightNavButton>
      			<View layout="vertical">
      				<Label text="MODAL 3"></Label>
      				<Label text="MODAL 3"></Label>
      				<Label text="MODAL 3"></Label>
      				<Label text="MODAL 3"></Label>
      			</View>
      		</Window>
      </Alloy>
      //Modal4.xml
      <Alloy>
      	<Window backgroundColor="#cccc00">
      			<RightNavButton>
      				<Button title="Next" onClick="onNext"/>
      			</RightNavButton>
      			<View layout="vertical">
      				<Label text="MODAL 4"></Label>
      				<Label text="MODAL 4"></Label>
      				<Label text="MODAL 4"></Label>
      				<Label text="MODAL 4"></Label>
      			</View>
      		</Window>
      </Alloy>
      //Modal5.xml
      <Alloy>
      	<Window backgroundColor="#e6e600">
      		<View layout="vertical">
      				<Label text="MODAL 5"></Label>
      				<Label text="MODAL 5"></Label>
      				<Label text="MODAL 5"></Label>
      				<Label text="MODAL 5"></Label>
      			</View>
      		</Window>
      </Alloy>
      

      Modal1.js, Modal3.js, Modal3.js, Modal4.js, Modal5.js

      //Modal1.js
      var args = $.args;
      function onNext()
      {
      	var modal2 = Alloy.createController("Modal2").getView();
      	Alloy.Globals.navRoot.openWindow(modal2);
      }
      //Modal2.js
      var args = $.args;
      function onNext()
      {
      	var modal2 = Alloy.createController("Modal2").getView();
      	Alloy.Globals.navRoot.openWindow(modal2);
      }
      //Modal3.js
      var args = $.args;
      function onNext()
      {
      	var modal3 = Alloy.createController("Modal3").getView();
      	Alloy.Globals.navRoot.openWindow(modal3);
      }
       
      //Modal4.js
      var args = $.args;
      function onNext()
      {
      	var modal4 = Alloy.createController("Modal4").getView();
      	Alloy.Globals.navRoot.openWindow(modal4);
      }
      //Modal5.js
      var args = $.args;
      function onNext()
      {
      	var modal5 = Alloy.createController("Modal5").getView();
      	Alloy.Globals.navRoot.openWindow(modal5);
      }
      

      tiapp.xml

      <ios>
              <enable-launch-screen-storyboard>true</enable-launch-screen-storyboard>
              <use-app-thinning>true</use-app-thinning>
              <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>
                      <key>UIRequiresPersistentWiFi</key>
                      <false/>
                      <key>UIPrerenderedIcon</key>
                      <false/>
                      <key>UIStatusBarHidden</key>
                      <false/>
                      <key>UIStatusBarStyle</key>
                      <string>UIStatusBarStyleDefault</string>
                  </dict>
              </plist>
          </ios>
      

      Test Environment:
      Using latest SDK 7.1.0.GA, 7.0.1.GA
      Latest CLI 7.0.2

      The Screen orientation not working in navigation window on iPhone.

      Thanks

        Attachments

        1. statusbar_screenshot.png
          statusbar_screenshot.png
          29 kB
        2. Step1.png
          Step1.png
          2.65 MB
        3. Step2.png
          Step2.png
          702 kB
        4. Step3.png
          Step3.png
          1.45 MB
        5. TestNavigationBar.zip
          84 kB

          Issue Links

            Activity

              People

              • Assignee:
                vijaysingh Vijay Singh
                Reporter:
                mrahman Mostafizur Rahman
                Reviewer:
                Hans Knöchel
                Tester:
                Samir Mohammed
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-6288
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code