Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8100] iOS: barImage hides nav buttons after window transition

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-07-12T06:03:13.000+0000
Affected Version/sRelease 1.8.2
Fix Version/sRelease 2.1.0, Sprint 2012-07
ComponentsiOS
LabelsSupportTeam, api, module_navgroup, qe-ios031912, qe-testadded
ReporterJoão Silva
AssigneeSabil Rahim
Created2012-02-10T04:05:24.000+0000
Updated2012-09-17T14:32:36.000+0000

Description

In window with a navbar that has a barImage and nav buttons (such as a rightNavButton), if we go to a child window and then back the nav buttons will be hidden by the barImage (but are still there and react to the touch). STEPS TO REPRODUCE: * Put the app.js (code below and attached) and navbar.png (attached) in the Resources directory * Run the code in the iOS simulator * Click on the "Open Window 2" button * Click on the back button to return to window 1 The right nav button will now be hidden (although you can still click it) app.js example code follows.

var win1 = Ti.UI.createWindow({
	title : 'Window 1',
	barImage : 'navbar.png'
});

var navButton = Ti.UI.createButton({
	title : 'rightNavButton'
});

navButton.addEventListener('click', function(e) {
	Ti.UI.createAlertDialog({
		message : 'nav button clicked'
	}).show();
});

win1.rightNavButton = navButton;
win1.titleControl = Ti.UI.createLabel({text : 'Title Control'});

var button = Ti.UI.createButton({
	width : 200,
	height : 50,
	title : 'Open Window 2'
});

button.addEventListener('click', function(e) {
	tabGroup.activeTab.open(win2);
});

win1.add(button);

var win2 = Ti.UI.createWindow({
	title : 'Window 2'
});

var tab1 = Ti.UI.createTab({
	title : 'Tab 1',
	window : win1
});

var tabGroup = Ti.UI.createTabGroup();

tabGroup.addTab(tab1);
tabGroup.open();

Possibly related to: http://developer.appcelerator.com/question/131672/rightnavbutton-and-leftnavbutton-not-displaying-in-181

Attachments

FileDateSize
app.js2012-02-10T04:05:24.000+0000711
navbar.png2012-02-10T04:05:24.000+00005154

Comments

  1. Allen Hartwig 2012-02-23

    This was not an issue prior to 1.8.1. Something else to note: During the child window open animation, the parent window nav buttons briefly become visible again.
  2. George Hess 2012-03-03

    Has there been any response from Appcelerator or progress made in solving this bug?
  3. Jeff Gordon 2012-03-03

    Based on my testing this is fixed in the 1.8.2 SDK released a few days ago.
  4. Allen Hartwig 2012-03-03

    This is *not* resolved in 1.8.2 for me.
  5. Allen Hartwig 2012-03-03

    The issue is only present when there is a custom barImage and a custom titleControl on the window.
  6. João Silva 2012-03-05

    I confirm Allen's report. In 1.8.2 the issue as reported by me above is fixed, however adding a titleControl such as
       win1.titleControl = Ti.UI.createLabel({text : 'Title Control'});
       
    will hide the nav button after a transition.
  7. Natalie Huynh 2012-03-20

    Confirmed the issue when adding the titleControl with 1.8.2 and 2.0.0.v20120320000301
  8. Dietrich Streifert 2012-04-02

  9. Vishal Duggal 2012-04-03

    Fixed on master by PR 1896
  10. Michael Pettiford 2012-06-20

    Closing issue Tested with Ti Studio build 2.1.0.201206200844 Ti Mobile SDK 2.1.0.v20120619172256 hash rd3a84b13 OSX Lion 10.7.3 iPhone 4S OS 5.1 The expected behavior is shown
  11. Shyam Bhadauria 2012-07-12

    Re-opening to edit label
  12. George Hess 2012-09-17

    Did anyone test this on a device running iOS 4? It is still an issue when running iOS v4.3.2.
  13. Sabil Rahim 2012-09-17

    @George- Which version of the TiSDK are you using ?
  14. George Hess 2012-09-17

    I'm using 2.1.2.GA. The first time I navigate back to the first window (in a navigation group) everything in the bar displays correctly. It is only after the second time that the left and right nav buttons start disappearing. I added [self updateBarImage]; to line 597 of iphone/Classes/TiUIWindowProxy.m and that seemed to do the trick for iOS 4.

JSON Source