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
/** | |
* We're going to create an infinite scrollable list. In this case, we're going to show a date. When you swipe left, | |
* you'll see yesterday. Then the day before yesterday, and so on. Swiping right shows you tomorrow, and so on. | |
*/ | |
var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); | |
var isAndroid = Ti.Platform.osname === 'android'; | |
/** | |
* Track where we are in the infinite scrollable views, and define how large of a step goes between each view. | |
*/ | |
var currentDate = new Date(), msIntervalBetweenViews = 1000/*ms*/ * 60/*s*/ * 60/*m*/ * 24/*h*/; |
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
var win = Ti.UI.createWindow(); | |
win.open(); | |
/// <<< Register & UnRegister Event Listeners | |
/** | |
* params: {event: 'event', callback: eventCallback} | |
*/ | |
function registerEventListener(obj, params) { | |
if ( typeof obj._eventListeners == 'undefined' ) { |
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
/*global Ti, alert */ | |
var SECS = 5; | |
var URL = 'testservice.js'; | |
var win = Ti.UI.createWindow({ | |
fullscreen: false, | |
navBarHidden: true, | |
exitOnClose: true | |
}); |
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
/* | |
Developed by Kevin L. Hopkins (http://kevin.h-pk-ns.com) | |
You may borrow, steal, use this in any way you feel necessary but please | |
leave attribution to me as the source. If you feel especially grateful, | |
give me a linkback from your blog, a shoutout @Devneck on Twitter, or | |
my company profile @ http://wearefound.com. | |
/* Expects parameters of the directory name you wish to save it under, the url of the remote image, | |
and the Image View Object its being assigned to. */ | |
cachedImageView = function(imageDirectoryName, url, imageViewObject) |
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
/** | |
* Override a tab group's tab bar on iOS. | |
* | |
* NOTE: Call this function on a tabGroup AFTER you have added all of your tabs to it! We'll look at the tabs that exist | |
* to generate the overriding tab bar view. If your tabs change, call this function again and we'll update the display. | |
* | |
* @param tabGroup The tab group to override | |
* @param backgroundOptions The options for the background view; use properties like backgroundColor, or backgroundImage. | |
* @param selectedOptions The options for a selected tab button. | |
* @param deselectedOptions The options for a deselected tab button. |