Last active
August 29, 2015 14:06
-
-
Save grantges/efaf6fa5da6df8d5bb04 to your computer and use it in GitHub Desktop.
An example of how to create a SplitWindow for iPad using Appcelerator Mobile SDK (with Alloy MVC Framework)
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
$.index.addEventListener('visible',function(e){ | |
if (e.view == 'detail'){ | |
e.button.title = "Master"; | |
$.index.detailView.getWindow().leftNavButton = e.button; | |
} else if (e.view == 'master'){ | |
$.index.detailView.getWindow().leftNavButton = null; | |
} | |
}); | |
$.index.open(); |
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
<Alloy> | |
<SplitWindow backgroundColor="white" platform="ios"> | |
<!-- First window is the masterView --> | |
<NavigationWindow> | |
<Window> | |
<ListView> | |
<ListSection headerTitle="Types"> | |
<ListItem title="Places" cat="place"></ListItem> | |
<ListItem title="Visible CheckPoints" cat="visible"></ListItem> | |
<ListItem title="Underground CheckPoints" cat="underground"></ListItem> | |
<ListItem title="Hazards" cat="hazard"></ListItem> | |
</ListSection> | |
</ListView> | |
</Window> | |
</NavigationWindow> | |
<!-- Second window is the detailView --> | |
<NavigationWindow> | |
<Window> | |
<Module id="mapview" module="ti.map" method="createView" /> | |
</Window> | |
</NavigationWindow> | |
</SplitWindow> | |
</Alloy> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment