Coder Social home page Coder Social logo

aasharebubbles's Introduction

Intro

Swift version:
https://github.com/takecian/SwiftShareBubbles

Animated Social share buttons control.
Supported buttons:
Facebook, Twitter, Google+, Tumblr, Vkontakte (vk.com), LinkedIn, Pinterest, Youtube, Vimeo, Reddit, Instagram, Whatsapp, E-mail, Add to favorites

Also supports custom buttons.

Demo video:
http://www.youtube.com/watch?v=0yvl4_db1F4

  

Installation

Two ways:

  1. Just drag n drop AAShareBubbles folder into your xcode project.
  2. CocoaPods:
pod 'AAShareBubbles'

Usage:

#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];
...

Delegate

-(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");
}

Requirements:

ARC, iOS 5+, Xcode 4+

Todo:

  • Add more social buttons.
  • Add opportunity to show bubbles in specified order.

aasharebubbles's People

Contributors

ayoze avatar eralpb avatar gitter-badger avatar kevin-hirsch avatar mixdesign avatar mohlman3 avatar mrfeiii avatar readmecritic avatar vjyanand avatar wzbozon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aasharebubbles's Issues

Only add 2 buttons, but it shows 3 buttons

I only add 2 buttons, but it shows 3 buttons.
let shareBubles: AAShareBubbles = AAShareBubbles.init(centeredInWindowWithRadius: 100)
shareBubles.delegate = self
shareBubles.bubbleRadius = 40
shareBubles.sizeToFit()
shareBubles.showFacebookBubble = true
shareBubles.showTwitterBubble = true
shareBubles.addCustomButtonWithIcon(UIImage(named: "twitter"), backgroundColor: UIColor.whiteColor(), andButtonId: 100)
shareBubles.show()

DimBackground

Hi!

I'm wondering if there is any way to control the background dimming functionality?
I would like there to be more contrast to show off how beautiful AAShareBubbles are! :)

[sharebubbles show] does not work when clicked twice

Hi, I have multiple subviews with share/social buttons, I have configured sharebubbles to show in the main view at the center of the screen when one of this button is clicked. The issue is that on the first time the share buttons are displayed correctly, subsequent share button clicks dont launch the sharebubbles on the main view, view gets lots somehow.

Is anybody else seeing this problem?

Thanks

Redundant line of code

In AAShareBubbles.m your code in line 78 is

[parentView addSubview:bgView];

and in line 79 you write

[parentView insertSubview:bgView belowSubview:self];

When you insert some view you automatically add it. So line 78 isn't necessary.

Greets

tableview cell Image?

Hi I am using this lib looking great ,But when i use in tableview i am passing sender instead of UIButton some time Button blink and bubles showing some other place.any reason?

Rotate device

Is there any simple way to change center point and radius when rotating device?

Custom image/buttons ?

I want to use some other buttons/images rather then the social icons and services listed in demo.
Like I want to add a link/bubble for appstore, blog, help docs, etc.

Is it possible to do, I mean are there any properties or options to do this ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.