当我点击导航栏上的分享按钮时,我想在Facebook,Twitter上分享我的图像。我使用这个库来实现共享https://github.com/mixdesign/AAShareBubbles。但我的代码不起作用,我点击导航栏中的分享按钮,但它只打印,不显示任何Facebook,Twitter分享按钮。
愿任何人帮助我。
我的代码:
@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 :(得分:1)
我想你错过了
shareBubles.show();