Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10929] iOS: buttonBar- Button bar when set as title control does not automatically size to NavBar

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-09-18T16:47:37.000+0000
Affected Version/sRelease 2.1.3
Fix Version/sRelease 2.1.3, Release 3.0.0, Sprint 2012-19 API, 2012 Sprint 19
ComponentsiOS
Labelsapi, qe-ios090112, qe-ios6, qe-nfc, qe-testadded
ReporterEric Merriman
AssigneeVishal Duggal
Created2012-09-14T18:09:29.000+0000
Updated2012-10-11T21:01:44.000+0000

Description

Reported from the community Q&A: Using the following code, the buttonbar is displayed outside the bounds of the navBar: Link to original posting: http://developer.appcelerator.com/question/140766/tabbedbar-ios-6-bug

Titanium.UI.setBackgroundColor('#000');

var tabGroup = Titanium.UI.createTabGroup();

var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});

var modeTabbedBar = Ti.UI.iOS.createTabbedBar({
                labels: [L('browse', 'Böngészés'), L('drivemode', 'Vezetés')],
                style: Titanium.UI.iPhone.SystemButtonStyle.BAR,
                width: '100%'
            });
 
win1.setTitleControl(modeTabbedBar);
            

tabGroup.addTab(tab1);  

tabGroup.open();
Note: when setting the height to 30, the button bar appears within the bounds of the navbar as in the second screenshot Note: When using iOS 5, the button bar fills the nav bar as in the third screenshot Steps to reproduce: 1) Using the sample code, run in iOS 6 simulator Expected result: Button bar fits inside the navbar Actual result: The button bar is outside the bounds of the navbar

Attachments

FileDateSize
Screen Shot 2012-09-14 at 6.01.15 PM.png2012-09-14T18:09:29.000+000030334
Screen Shot 2012-09-14 at 6.02.04 PM.png2012-09-14T18:09:29.000+000026498
Screen Shot 2012-09-14 at 6.07.29 PM.png2012-09-14T18:09:29.000+000030800

Comments

  1. Vishal Duggal 2012-09-17

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/2979
  2. Vishal Duggal 2012-09-18

    Backport (2_1_X) PR https://github.com/appcelerator/titanium_mobile/pull/2990
  3. Eric Merriman 2012-09-20

    Verified fixed with Kitchensink and sample code on: Mountain Lion 10.8.1 Xcode 4.5 GM Titanium Studio, build: 2.1.2.201208301612 SDK: 2.1.3.v20120918170114 iPhone 4s iOS 6 iPhone 6.0 simulator
  4. Markus Wutzler 2012-09-26

    this applies also on ButtonBar when it is used within a keyboard toolbar in TextField or TextArea for instance. Is there a separate ticket concerning this?
  5. Ingo Muschenetz 2012-09-30

    Markus, it does not appear so. Can you please file a separate ticket for that issue?

JSON Source