Skip to content

Instantly share code, notes, and snippets.

@rubenfonseca

rubenfonseca/app.js

Created Jun 5, 2012
Embed
What would you like to do?
Custom menu on Sharekit
var dialog = Ti.UI.createOptionsDialog({
title: "Share",
options: ['Twitter', 'Facebook', 'Mail', 'Cancel'],
cancel: 3 // index of cancel option
});
dialog.addEventListener('click', function(e) {
if(e.index == e.cancel) { return; }
var sharer = null;
switch(e.index) {
case 0:
sharer = 'Twitter'
break;
case 1:
sharer = 'Facebook'
break;
case 2:
sharer = 'Mail'
break;
}
sharekit.share({
title: 'Title',
text: 'Text',
sharer: sharer, // here it is :)
view: view // always specifiy the view that originated the share event
});
});
dialog.show();
@rubenfonseca

This comment has been minimized.

Copy link
Owner Author

@rubenfonseca rubenfonseca commented Jun 5, 2012

the list of sharers names are inside the documentation/ folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment