Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions ep-002/Resources/NavigationController.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ exports.NavigationController.prototype.open = function(/*Ti.UI.Window*/windowToO

//grab a copy of the current nav controller for use in the callback
var that = this;
windowToOpen.addEventListener('close', function() {

// save the 'close' event handler into a variable (will be used to remove the event listener below)
var windowToOpen_closeEventHandler = function() {
that.windowStack.pop();
});
// remove this function from the 'close' event lisetner => prevents to be triggered more than once
windowToOpen.removeEventListener('close', windowToOpen_closeEventHandler);
};

windowToOpen.addEventListener('close', windowToOpen_closeEventHandler);


//hack - setting this property ensures the window is "heavyweight" (associated with an Android activity)
windowToOpen.navBarHidden = windowToOpen.navBarHidden || false;
Expand Down