SwiftShareBubbles alternatives and similar libraries
Based on the "Button" category.
Alternatively, view SwiftShareBubbles alternatives based on common mentions on social networks and blogs.
-
Hamburger button transition
Hamburger button transition. -
LGButton
A fully customisable subclass of the native UIControl which allows you to create beautiful buttons without writing any line of code. -
TransitionButton
UIButton subclass for loading and transition animation. -
PMSuperButton
A powerful UIButton with super powers, customizable from Storyboard. -
NFDownloadButton
Revamped Download Button. It's kinda a reverse engineering of Netflix's app download button. -
AHDownloadButton
Customizable download button with progress and transition animations. It is based on Apple's App Store download button. -
FloatingButton
Easily customizable floating button menu created with SwiftUI. -
SimpleButton
Simple UIButton subclass with additional state change animations (e.g. backgroundColor) and missing features -
HamburgerButton
Hamburger button with a slick animation. -
DesignableButton
A Custom UIButton with Centralised Styling and common styles available in Interface Builder -
ExpandableButton
Customizable and easy to use expandable button. -
MultiToggleButton
A UIButton subclass that implements tap-to-toggle button text. (Like the camera flash and timer buttons.) -
NxEnabled
Library which allows you binding `enabled` property of button with textable elements (TextView, TextField)
Get performance insights in less than 4 minutes
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of SwiftShareBubbles or a related project?
README
SwiftShareBubbles
Animated Social share buttons control for iOS written in Swift. This library is inspired AAShareBubbles.
[ShareBubbles1](./Resource/ShareBubbles1.gif)
I tried AAShareBubbles with Swift, it mostly worked. But I cannot use AAShareBubbles(Objective-c code) in protocol extension. So I created SwiftShareBubbles in pure Swift.
Requirements
iOS 8.0 or later, written in Swift.
Installation
Cocoapods
pod 'SwiftShareBubbles'
Carthage
SwiftRoutes is compatible with Carthage. Add it to your Cartfile
:
github "takecian/SwiftShareBubbles"
Usage
- Instantiate SwiftShareBubbles, specify center position and radius of Circle.
- Choose social buttons to be shown.
- Set delegate
- Call show method.
class ViewController: UIViewController, SwiftShareBubblesDelegate {
var bubbles: SwiftShareBubbles?
override func viewDidLoad() {
super.viewDidLoad()
bubbles = SwiftShareBubbles(point: CGPoint(x: view.frame.width / 2, y: view.frame.height / 2), radius: 100, in: view)
bubbles?.showBubbleTypes = [Bubble.twitter, Bubble.line, Bubble.safari]
bubbles?.delegate = self
}
// SwiftShareBubblesDelegate
func bubblesTapped(bubbles: SwiftShareBubbles, bubbleId: Int) {
if let bubble = Bubble(rawValue: bubbleId) {
print("\(bubble)")
switch bubble {
case .facebook:
break
case .twitter:
if SLComposeViewController.isAvailable(forServiceType: SLServiceTypeTwitter) {
guard let composer = SLComposeViewController(forServiceType: SLServiceTypeTwitter) else { return }
composer.setInitialText("test test")
present(composer, animated: true, completion: nil)
}
break
case .line:
break
default:
break
}
} else {
// custom case
}
}
func bubblesDidHide(bubbles: SwiftShareBubbles) {
}
@IBAction func buttonTapped(_ sender: Any) {
bubbles?.show()
}
}
[ShareBubbles2](./Resource/ShareBubbles2.gif)
Supported buttons
- LINE
- google plus
- Youtube
- Pintereset
- Safari
Custom icons
You can add custom icons as follows,
class ViewController: UIViewController, SwiftShareBubblesDelegate {
var bubbles: SwiftShareBubbles?
let customBubbleId = 100
override func viewDidLoad() {
super.viewDidLoad()
...
let customAttribute = ShareAttirbute(bubbleId: customBubbleId, icon: UIImage(named: "Custom")!, backgroundColor: UIColor.white)
bubbles?.customBubbleAttributes = [customAttribute]
bubbles?.delegate = self
}
func bubblesTapped(bubbles: SwiftShareBubbles, bubbleId: Int) {
if customBubbleId == bubbleId {
// custom case
print("custom tapped")
}
}
}
License
MIT
*Note that all licence references and agreements mentioned in the SwiftShareBubbles README section above
are relevant to that project's source code only.