在iphone中自定义addthis分享按钮?

时间:2012-04-24 11:46:35

标签: iphone addthis

我正在使用AddThis(JavaScriptAddThisIosAddThis

用于在iphone中实现的分享按钮,但我想自定义分享按钮。我想更改按钮的文本(分享),如下所示:

enter image description here

OR

只显示图像:

enter image description here

我刚刚添加了addthis.h文件和 使用addthis作为:

    - (void)viewDidLoad
{

 [AddThisSDK showAddThisButtonInView:self.view withFrame:CGRectMake(75, 50, 20, 20) forURL:@"http://www.google.com" withTitle:@"Check this out" description:@"Loren ipsum dolor sit amet , consectetuer adipisci"];

    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

我该怎么做.. ???

1 个答案:

答案 0 :(得分:1)

  

大家好,我已经解决了这个问题你可以看到我的代码   写在这里。不是真的,但它工作得很完美。代码是   如下:

    - (void)viewDidLoad
{

 UIButton *btn=[[UIButton alloc] init];

      btn=[AddThisSDK showAddThisButtonInView:nil 
withFrame:CGRectMake(75, 50, 20, 20)    forURL:@"http://www.google.com" 
withTitle:@"Check this out" 
description:@"Loren ipsum dolor sit amet , consectetuer adipisci"];

 [btn setBackgroundImage:[UIImage imageNamed:@"Icon.png"] forState:UIControlStateNormal];
 [self.view addSubview:btn];

    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}
  

并感谢您的快速回复......!

相关问题