Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

close current window by another controller ?

$
0
0

hello guys

i want to close the current window using another controller, i am using it for Back option in ios devices

so i included the header controller inside each window , when the user click on the image Back , the current window shall be closed

this is my code

index.js


$.include_header.add(Alloy.createController('include_header',{"activity" : 'index','context': $}).getView());

header.js


var args = arguments[0] || {};

$.homeButton.addEventListener('click',function(e){

//we don't lunch twice sorry !
if(  args.activity == 'index' )
{
    return;
}else
{

   args.context.close();
}

});


how i can make header.js able to close index.js ?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>