2015-12-11 49 views
1

我想分享我在Facebook,Twitter圖片當我點擊導航欄上的分享按鈕。我使用這個庫來實現共享https://github.com/mixdesign/AAShareBubbles。但我的代碼不起作用,我點擊導航欄中的分享按鈕,但它只打印,不顯示任何Facebook,Twitter分享按鈕。如何實現AAShareBubles

可能有人幫助我。

我的代碼:

@IBAction func onShareTouched(sender: AnyObject) { 

// print("share") 
// 
// let myShare = "I am feeling *** today" 
// 
// let shareVC: UIActivityViewController = UIActivityViewController(activityItems: [myShare], applicationActivities: nil) 
// self.presentViewController(shareVC, animated: true, completion: nil) 
    print("share bubles") 
// let shareBubles: AAShareBubbles = AAShareBubbles.init(point: CGPoint(x: 100, y: 100), radius: 100, inView: self.view) 
    let shareBubles: AAShareBubbles = AAShareBubbles.init(centeredInWindowWithRadius: 100) 
    shareBubles.delegate = self 
    shareBubles.bubbleRadius = 45 
    shareBubles.showFacebookBubble = true 
    shareBubles.showTwitterBubble = true 
    shareBubles.showGooglePlusBubble = true 
    shareBubles.showMailBubble = true 
    shareBubles.showTumblrBubble = true 
    shareBubles.showVkBubble = true 
    shareBubles.addCustomButtonWithIcon(UIImage(named: "loveface"), backgroundColor: UIColor.greenColor(), andButtonId: 100) 

    } 
+0

shareBubles.show(); ?? –

+0

非常感謝,只是忘了這行:D。它現在工作。 – Khuong

回答

1

我想你錯過

shareBubles.show();