Question

I need a quick response please help me out, I just need to know a very basic thing in iPhone Titanium that how to call new window on button click. My application is running on android and I used these lines of code to call another window but it is not working on iPhone.

var MainMenuScreen = require('/ui/iphone/MenuScreen/MainMenuScreen');
MainMenu = new MainMenuScreen(json);
MainMenu.open();

But it doesn't work on iPhone, Please help me out quickly. As its just my login screen then I have to manipulate between many windows and views so how can I do that on iPhone.

Was it helpful?

Solution

Muhammad, make the following change in your code

var MainMenuScreen = require('ui/iphone/MenuScreen/MainMenuScreen');

I've removed the '/' from your path. Because It's just needed for android. Read Global method require. Also the above code will work for android also.

You can refer this answer also, which tells about navigation between windows.

Hope this resolved your issues

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top