-
-
Save viezel/5984723 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var NappUI = require("NappUI"); | |
NappUI.initNappUI(); | |
// do some Napp UI magic | |
var view = Ti.UI.createView({ | |
backgroundColor: '#999', | |
height: 100, | |
shadow: { | |
shadowColor: '#000', | |
shadowRadius: 10, | |
shadowOffset: { x: 5, y: 5 }, | |
shadowOpacity: 1 | |
}, | |
top: 50, | |
width: 100 | |
}); |
This file contains hidden or 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
// We need to add the following proxies to our project before Napp UI works. | |
// This is due to some limitations of the Titanium Module SDK | |
// Please run this after you require the | |
exports.initNappUI() { | |
require('dk.napp.ui'); // require the module | |
// window and tabs | |
var win1 = Ti.UI.createWindow(); | |
var tb1 = Ti.UI.createTab({window: win1}); | |
var tabGr = Ti.UI.createTabGroup({tabs:[tb1]}); | |
var textf = Ti.UI.createTextField(); | |
// WebView | |
var webV = Ti.UI.createWebView(); | |
// SearchBar | |
var SBar = Ti.UI.createSearchBar(); | |
// ScrollableView | |
var scroV = Ti.UI.createScrollableView(); | |
// Picker | |
var picker = Ti.UI.createPicker(); | |
// Toolbar | |
var toolBar = Ti.UI.createToolbar(); | |
// Lets remove this from memory | |
var win1 = null; | |
var tb1 = null; | |
var tabGr = null; | |
var textf = null; | |
var webV = null; | |
var SBar = null; | |
var scroV = null; | |
var picker = null; | |
var toolBar = null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment