问题
I want to add share content functionality in my iOS app. I am developing an app in titanium for iPhone. I want to add a share button that when a user clicks will open a dialog box contains many different option like Facebook, twitter, email , and print.
回答1:
Unless this has been included in the Appcelerator Framework, you are going to have to write a module
"Share Screen" iOS 6
回答2:
There is a module for this that wraps the Social.framework on iOS. Ive used it in my own apps and its quite nice. Find it here.
And a small example of how to make it work.
var Social = require('com.0x82.social');
Social.showActivityItems({
activityItems : ["http://stackoverflow.com"]
});
Social.addEventListener('activityWindowClosed', function(e) {
if (e.completed) {
alert('Shared successfully');
}
});
来源:https://stackoverflow.com/questions/17440935/equivalent-to-androids-share-intent-concept-for-iphone-using-titanium