AAShareBubbles 1.2.4

AAShareBubbles 1.2.4

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最后一个版本2016年3月

Almas Adilbek 维护。



  • 作者:
  • Almas Adilbek

简介

动画社交分享按钮控制.
支持的按钮
FacebookTwitterGoogle+TumblrVkontakte (vk.com)LinkedInPinterestYoutubeVimeoRedditInstagramWhatsappE-mail添加到收藏

也支持自定义按钮。

演示视频
http://www.youtube.com/watch?v=0yvl4_db1F4

  

安装

两种方式
1.只要将 AAShareBubbles 文件夹拖拽到您的 xcode 项目中。
2.CocoaPods:

pod 'AAShareBubbles'

使用方法

#import "AAShareBubbles.h"
AAShareBubbles *shareBubbles = [[AAShareBubbles alloc] initWithPoint:CGPointMake(100, 100)
                                                              radius:100
                                                              inView:self.view];
shareBubbles.delegate = self;
shareBubbles.bubbleRadius = 45; // Default is 40
shareBubbles.showFacebookBubble = YES;
shareBubbles.showTwitterBubble = YES;
shareBubbles.showMailBubble = YES;
shareBubbles.showGooglePlusBubble = YES;
shareBubbles.showTumblrBubble = YES;
shareBubbles.showVkBubble = YES;

// add custom buttons -- buttonId for custom buttons MUST be greater than or equal to 100
[shareBubbles addCustomButtonWithIcon:[UIImage imageNamed:@"custom-icon"]
                      backgroundColor:[UIColor greenColor]
                          andButtonId:100];


[shareBubbles show];

// Use another initialization method to create share buttons on UIWindow instance (at the center)
AAShareBubbles *shareBubbles = [[AAShareBubbles alloc] initCenteredInWindowWithRadius:100];
...
代理
-(void)aaShareBubbles:(AAShareBubbles *)shareBubbles tappedBubbleWithType:(AAShareBubbleType)bubbleType
{
    switch (bubbleType) {
        case AAShareBubbleTypeFacebook:
            NSLog(@"Facebook");
            break;
        case AAShareBubbleTypeTwitter:
            NSLog(@"Twitter");
            break;
        case AAShareBubbleTypeMail:
            NSLog(@"Email");
            break;
        case AAShareBubbleTypeGooglePlus:
            NSLog(@"Google+");
            break;
        case AAShareBubbleTypeTumblr:
            NSLog(@"Tumblr");
            break;
        case AAShareBubbleTypeVk:
            NSLog(@"Vkontakte (vk.com)");
            break;
        case 100:
            // custom buttons have type >= 100
            NSLog(@"Custom Button With Type 100");
            break;
        default:
            break;
    }
}

-(void)aaShareBubblesDidHide:(AAShareBubbles *)bubbles {
    NSLog(@"All Bubbles hidden");
}

要求

ARCiOS 5+Xcode 4+

待办事项

  • 添加更多社交按钮。
  • 添加显示指定顺序气泡的机会。