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

iOS: OrientationModes in NavigationGroup windows can't be locked

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Invalid
    • Affects Version/s: Release 1.7.1, Release 2.1.1, Release 3.0.2
    • Fix Version/s: None
    • Component/s: iOS
    • Environment:

      Titanium SDK: Mobile 1.7.1
      Platform OS: iOS Version: 4.3

      Description

      Problem

      It seems like Ti can't lock orientation modes in specific windows when targeting the NavigationGroup root window.

      Repro sequence set Root Window as LANDSCAPE, then when a child window is opened (in a navgroup) is not set whether PORTRAIT nor LANDSCAPE modes as specified.

      Tested on

      Simulator iOS 4.3 & iPod device

      Repro sequence

      app.js

      var win = Ti.UI.createWindow({
      	backgroundColor:'gray'
      });
       
      var open = Ti.UI.createButton({
          title:'Open nav group',
          top:150,
          width:200,
          height:40
      });
      open.addEventListener('click', function() {
          modal.open({modal:true});
      });
       
      win.add(open);
       
      var modal = Ti.UI.createWindow({
          //navBarHidden:true,
          title:'ModalWin'
      });
       
       
       
      var modalWin = Ti.UI.createWindow({
          backgroundColor:"red"
      });
       
      // initialize to LANDSCAPE MODE
      modal.orientationModes = [
          Titanium.UI.LANDSCAPE_LEFT,
          Titanium.UI.LANDSCAPE_RIGHT,
      ]; 
       
       
      var nav = Ti.UI.iPhone.createNavigationGroup({
          window:modalWin
      });
       
      var table = Ti.UI.createTableView({
          style:Ti.UI.iPhone.TableViewStyle.GROUPED,
          data:[{title:"Well look at this"},{title:"TweetDeck is cool"}]
      });
      modalWin.add(table);
       
      var done = Titanium.UI.createButton({
          systemButton:Titanium.UI.iPhone.SystemButton.DONE
      });
       
      modalWin.setRightNavButton(done);
       
      done.addEventListener('click',function() 
      {
          modal.close();
      });
       
      table.addEventListener('click',function(e)
      {
          var b = Titanium.UI.createButton({
              title:'Back (no anim)',
              style:Titanium.UI.iPhone.SystemButtonStyle.BORDERED
          });
          b.addEventListener('click', function() {
              nav.close(w,{animated:false});
          });
          var w = Ti.UI.createWindow({
              title:e.rowData.title,
              rightNavButton:b
          });
          
          // initialize to portrait modes
      w.orientationModes = [
          Titanium.UI.PORTRAIT,//Portrait mode is not set either
          Titanium.UI.UPSIDE_PORTRAIT,//This window doesn't rotate
      ]; 
       
          
          
          w.addEventListener('focus',function()
          {
              Ti.API.info("nav group window -- focus event");
          });
          w.addEventListener('blur',function()
          {
              Ti.API.info("nav group window -- blur event");
          });
          var b = Ti.UI.createButton({
              title:"Close Nav",
              width:120,
              height:40
          });
          b.addEventListener('click',function()
          {
              modal.close();
          });
          w.add(b);
          nav.open(w);
      });
       
      modal.add(nav);
      modal.open();
      

      Associated HD ticket

      #APP-293437

        Attachments

          Activity

            People

            • Assignee:
              emerriman Eric Merriman
              Reporter:
              egomez Eduardo Gomez (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code