Skip to content

Instantly share code, notes, and snippets.

@pegli
Last active December 14, 2015 13:09
Show Gist options
  • Save pegli/5091655 to your computer and use it in GitHub Desktop.
Save pegli/5091655 to your computer and use it in GitHub Desktop.
var args = arguments[0] || {};
var event = args.event;
var parent = args.parent;
$.addEventListener('swipe', function(e) {
parent.swipe(e);
}
var currentRow;
var tableViewRow = Alloy.createController('eventRow', { event: event, parent: $ });
exports.swipe = function(e) {
if (!!current_row) {
current_row.v2.animate({
opacity: 1,
duration: 500
});
};
current_row = Ti.Platform.osname == 'android' ? this : e.row; // it looks like android does not have the e.row property for this event.
current_row.v2.animate({
opacity: 0,
duration: 500
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment