Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2899] [Exit/Back Button] problem with exit app without back button !

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2012-07-26T13:38:17.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterFĂ©lix
AssigneeNeeraj Gupta
Created2011-04-15T03:32:25.000+0000
Updated2012-07-26T21:29:59.000+0000

Description

Hi,
I read a lot of things with back button and exit button, but nothing answer me.
Is it possible to do an EXIT Button which exit app like pressing back button in a light window ?
I give you a code that works but only when you launch it a second time (don't know why) !
app.js

// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
Ti.include('mainCloseView.js');
var FTimer = null;
function DoTimeout()
{
//  clearTimeout(FTimer);

DoCloseMainWin();



} DoMainCloseView(); FTimer = setTimeout( DoTimeout, 5000);

mainCloseView.js

var MainCloseWin = null;
function DoMainCloseView()
{

MainCloseWin = Titanium.UI.createWindow({
title:'TabViewLogin',
exitOnClose:true,
navBarHidden: true
});
MainCloseWin.open();



} function DoCloseMainWin(){
MainCloseWin.close();



}
With or without navBarHidden it's the same thing.
ty

Comments

  1. Paul Dowsett 2011-06-06

    This is not a bug - it is a request for help! Suggest close ticket and mark invalid.
  2. Stephen Tramer 2012-07-26

    No.

JSON Source