Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3236] iOS: Orientation on iPhone doesn't update Ti.UI.TabGroup correctly

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-05-07T11:51:58.000+0000
Affected Version/sRelease 3.0.0
Fix Version/s2013 Sprint 10
ComponentsiOS
Labelsapi
ReporterMichal Gondar
AssigneeShameer Jan
Created2011-04-15T03:40:07.000+0000
Updated2017-03-21T22:19:46.000+0000

Description

Titanium Developer 1.2.2
Titanium SDK 1.6
iPhone SDK 4.2 on simulator

sample code http://pastie.org/1619046">http://pastie.org/1619046

[1st issue] 2 tabs, each of them got different orientationMode set.
1st tab loads fine in simulator.
by clicking on the second tab, tabGroup is wrongly resized.

[second issue] app loads fine on the beginning.
by clicking on the second tab, app is rotated as per orientationMode
by clicking on 1st tab again, orientationMode is ignored.

looks like orientationMode is considered just once, on window open, and not anymore.
(catching orientationChange event and changing it there is bugging tabGroup and sometimes dimension of whole window - http://img696.imageshack.us/i/bugiz.jpg/">http://img696.imageshack.us/i/bugiz.jpg/)

Attachments

FileDateSize
bug.jpg2011-04-15T03:40:07.000+000054505

Comments

  1. Junaid Younus 2012-09-04

    Tested on the iOS simulator using TiSDK 2.2.0v20120904101713, issue still valid. The first time the tab is resized incorrectly, if you repeat the steps, it will be resized correctly. So it's always the first time that it doesn't update appropriately.
       var tabGroup = Titanium.UI.createTabGroup();
        
       var win1 = Titanium.UI.createWindow({  
           title:'Tab 1',
         orientationModes: [Titanium.UI.LANDSCAPE_LEFT]
       });
       var tab1 = Titanium.UI.createTab({  
           title:'Tab 1',
           window:win1
       });
        
       var win2 = Titanium.UI.createWindow({  
           title:'Tab 2',
         orientationModes: [Titanium.UI.PORTRAIT]
       });
       var tab2 = Titanium.UI.createTab({  
           title:'Tab 2',
           window:win2
       });
        
       tabGroup.addTab(tab1);  
       tabGroup.addTab(tab2);
        
       tabGroup.open();
       
  2. Shameer Jan 2013-05-07

    Issue cannot reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0
  3. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced and due to the above comments.

JSON Source