Tôi biết làm thế nào để chia sẻ hình ảnh cô đơn:chia sẻ bội mục có sharekit trên facebook
// Create a UIImage.
UIImage *image = [UIImage imageNamed:@"ShareKit.jpg"];
// Wrap the UIImage within the SHKItem class
SHKItem *item = [SHKItem image:image title:@"This image was sent with ShareKit!"];
// Create a ShareKit ActionSheet and Assign the Sheet an SHKItem
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
// Display the ActionSheet in the current UIView
[actionSheet showInView:self.view];
và làm thế nào để chia sẻ một liên kết cô đơn:
// Create an NSURL. This could come from anywhere in your app.
NSURL *url = [NSURL URLWithString:@"http://mobile.tutsplus.com"];
// Wrap the URL within the SHKItem Class
SHKItem *item = [SHKItem URL:url title:@"Mobiletuts!"];
// Create a ShareKit ActionSheet and Assign the Sheet an SHKItem
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
// Display the ActionSheet in the current UIView
[actionSheet showInView:self.view];
nhưng tôi không biết làm thế nào để chia sẻ cả liên kết và hình ảnh trong cùng một thời điểm. có ai có thể giúp tôi trong việc này không?
hi .. cũng quan tâm đến cách thêm mô tả? có nghĩa là để nói văn bản, url và hình ảnh cùng một lúc? – lakesh
bất kỳ ý tưởng nào về điều đó? cần một số hướng dẫn? – lakesh
@lakesh ví dụ tôi đã đưa ra hiển thị văn bản, URL và hình ảnh đang được chia sẻ trong một yêu cầu. Xem cách từ điển sử dụng 3 cặp khóa-đối tượng trong sự khởi tạo của nó. – imnk