-
-
Save botmaster/7005037 to your computer and use it in GitHub Desktop.
How to decide what window to open first in Titanium Alloy. You can remove all markup from the index.xml view (the file itself must be there!) and then create another controller based on your logic.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* /Resources/app.js - Generated by Alloy, here to understand the flow */ | |
var Alloy = require("alloy"), _ = Alloy._, Backbone = Alloy.Backbone; | |
Alloy.createController("index"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* /app/controllers/index.js */ | |
if (Ti.App.Properties.getBool('isLoggedIn', false)) { | |
Alloy.createController("home"); | |
} else { | |
Alloy.createController("login"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- /app/views/index.xml --> | |
<Alloy /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment