[AC-2303] iOS: BackButton disapears when barImage is redefined
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-04-05T23:49:25.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | Backbutton, barImage, ios, orientation |
Reporter | Mads Moller |
Assignee | Mauro Parra-Miranda |
Created | 2012-12-04T13:32:33.000+0000 |
Updated | 2016-03-08T07:41:19.000+0000 |
Description
I have a orientation listener that swaps out the barImage of the navGroup when orientation is changed. This works great. BUT: when pressing the backbutton, and Back Button is gone in every new window I open.
If I comment out this orientationchange listener, then the backButton appears as normal.
Its not a custom backbutton.
Ti.Gesture.addEventListener('orientationchange', orientationHandler);
function orientationHandler(e){
switch(e.orientation){
case Ti.UI.PORTRAIT:
case Ti.UI.UPSIDE_PORTRAIT:
window.setBarImage("/images/header.png");
break;
case Ti.UI.LANDSCAPE_LEFT:
case Ti.UI.LANDSCAPE_RIGHT:
window.setBarImage("/images/header_wide.png");
break;
case Ti.UI.UNKNOWN:
default:
// do nothing
break;
}
}
Tested the following code with Titanium 3.0.2.GA
Can't reproduce with 3.1.3.