ShowTable of Contents hide splitview navigation after click When you have a splitview and the iPad is in portrait mode, the navigation window is displayed when clicking on the topleft button. If you have for example a tableview with a table of content in that window, you might want to hide the navigation window after the user clicked an entry. Add this to your click handler:
App.splitView.setMasterPopupVisible(true);
App.splitView.setMasterPopupVisible(false);
(In this example, the splitView object is a member of the App object.)
force orientation at startup Example: if orientation at startup is not landscape, switch to landscape left or right depending on the current orientation.
if(YNUI.isIPad) {
if(Ti.UI.orientation != Ti.UI.LANDSCAPE_LEFT && Ti.UI.orientation != Ti.UI.LANDSCAPE_RIGHT) {
if(Ti.UI.orientation == Ti.UI.PORTRAIT) {
Ti.UI.orientation = Titanium.UI.LANDSCAPE_RIGHT;
} else if(Ti.UI.orientation == Ti.UI.UPSIDE_PORTRAIT) {
Ti.UI.orientation = Titanium.UI.LANDSCAPE_LEFT;
} else {
Ti.UI.orientation = Titanium.UI.LANDSCAPE_RIGHT;
}
}
}
Note: this example uses the YNUI object found in the YouAtNotes Framework.
|