[TIMOB-8100] iOS: barImage hides nav buttons after window transition
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-12T06:03:13.000+0000 |
Affected Version/s | Release 1.8.2 |
Fix Version/s | Release 2.1.0, Sprint 2012-07 |
Components | iOS |
Labels | SupportTeam, api, module_navgroup, qe-ios031912, qe-testadded |
Reporter | João Silva |
Assignee | Sabil Rahim |
Created | 2012-02-10T04:05:24.000+0000 |
Updated | 2012-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
File | Date | Size |
---|---|---|
app.js | 2012-02-10T04:05:24.000+0000 | 711 |
navbar.png | 2012-02-10T04:05:24.000+0000 | 5154 |
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.
Has there been any response from Appcelerator or progress made in solving this bug?
Based on my testing this is fixed in the 1.8.2 SDK released a few days ago.
This is *not* resolved in 1.8.2 for me.
The issue is only present when there is a custom barImage and a custom titleControl on the window.
I confirm Allen's report. In 1.8.2 the issue as reported by me above is fixed, however adding a titleControl such as
will hide the nav button after a transition.
Confirmed the issue when adding the titleControl with 1.8.2 and 2.0.0.v20120320000301
Fixed on master by PR 1896
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
Re-opening to edit label
Did anyone test this on a device running iOS 4? It is still an issue when running iOS v4.3.2.
@George- Which version of the TiSDK are you using ?
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.