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

iOS7: Window moves incorrectly when in-call/hotspot/etc. status bar is showing

    Details

      Description

      Problem Description

      When the "in-call status" bar is showing, new windows and then the root window change their top position incorrectly.

      Try this test which opens subsequent windows in a NavigationWindow (with random colors).

      Steps to reproduce

      In the simulator, open some windows, then in the simulator menu, go to Hardware > Toggle In-Call Status Bar.

      The window moves down, as expected at first. Now open some more windows, and you should see the windows showing incorrectly, despite being set at fullscreen:false

      Now go back to the root window and see that it's wrong too.

      If your app can re-orientate in tiapp.xml, it seems to reset after being upside down.

      Also try turning the bar off and on again.

      Test Case

      /* 
       
       Fun with NavigationWindow!
       
       creates random coloured windows which create buttons which create random coloured windows which create buttons which...
       you get the picture ;)
       
       Required : Titanium SDK 3.1.3 or higher.
       
       Kosso
       
      */
       
       
      function randomColor(){
        return '#'+(function lol(m,s,c){return s[m.floor(m.random() * s.length)] + (c && lol(m,s,c-1));})(Math,'0123456789ABCDEF',4);
      }
       
      // Works with Release 3.1.3 and later
      var rootWin = Ti.UI.createWindow({
      		backgroundColor:randomColor(),
      		fullscreen:false,
      		barColor:randomColor(),
      		navTintColor:randomColor(),
      		translucent:false
      	});
       
       
       
      var b1 = Ti.UI.createButton(
      	{
      		title:'NEW',
      		borderColor:'black',
      		borderWidth:2,
      		width:200,
      		height:60,
      		borderRadius:30,
      		tintColor:'red',
      		backgroundColor:'white'
      	});
      	
      b1.addEventListener('click',function(){ 
      	navWin.openWindow(buildNewWindow({
      		backgroundColor:randomColor(),
      		fullscreen:false,
      		barColor:randomColor(),
      		navTintColor:randomColor(),
      		translucent:true		
      	})); 
      });
       
      rootWin.add(b1);
       
      var navWin = Ti.UI.iOS.createNavigationWindow({window:rootWin});
       
       
      function buildNewWindow(args){
      	
      	var _self = Ti.UI.createWindow(args);
      	var btn_new = Ti.UI.createButton(
      	{
      		title:'NEW',
      		top:20,
      		borderColor:'black',
      		borderWidth:2,
      		width:200,
      		height:60,
      		borderRadius:30,
      		tintColor:'red',
      		backgroundColor:'white'
      	});	
      	_self.add(btn_new);
      	
      	btn_new.addEventListener('click', function(){
      		navWin.openWindow(buildNewWindow({
      								backgroundColor:randomColor(),
      								fullscreen:false,
      								barColor:randomColor(),
      								navTintColor:randomColor(),
      								translucent:true
      							}
      						)
      					); 
      	});
       
      	var btn_back = Ti.UI.createButton(
      	{
      		title:'< BACK',
      		bottom:40,
      		borderColor:'white',
      		borderWidth:2,
      		width:200,
      		height:60,
      		borderRadius:30,
      		tintColor:'white',
      		backgroundColor:'#333'
      	});	
      	_self.add(btn_back);
      	
      	btn_back.addEventListener('click', function(){
      		navWin.closeWindow(_self);
      	});	
      	
      	return _self;
      	
      }
       
       
      navWin.open();
       
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vduggal Vishal Duggal (Inactive)
                Reporter:
                kosso kosso
                Reviewer:
                Pedro Enrique (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration