All Projects β†’ jjochen β†’ Jjfloatingactionbutton

jjochen / Jjfloatingactionbutton

Licence: mit
Floating Action Button for iOS

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Jjfloatingactionbutton

Hover
🎈 The smartest floating button
Stars: ✭ 81 (-66.67%)
Mutual labels:  cocoapods, fab, floatingactionbutton
Floatingactionbuttonspeeddial
A Floating Action Button Speed Dial implementation for Android that follows the Material Design specification (https://material.io/components/buttons-floating-action-button#types-of-transitions)
Stars: ✭ 1,164 (+379.01%)
Mutual labels:  material-design, floatingactionbutton
Tc Material Design
SΓ©rie de artigos sobre o Material Design Android
Stars: ✭ 64 (-73.66%)
Mutual labels:  material-design, floatingactionbutton
Pentagonfloatingactionbutton
Android property animation - The Value Animator
Stars: ✭ 106 (-56.38%)
Mutual labels:  material-design, floatingactionbutton
Android Material Design For Pre Lollipop
Various UI implementations, animations & effects based on Material Design compatible with pre Lollipop devices as well. (Work in progess)
Stars: ✭ 585 (+140.74%)
Mutual labels:  material-design, fab
React Fab Fan
Floating action button fan built with react and react-motion
Stars: ✭ 14 (-94.24%)
Mutual labels:  material-design, fab
Materialdesignsymbol
Icon font library for Swift. Currently supports GoogleMaterialDesignIcons
Stars: ✭ 92 (-62.14%)
Mutual labels:  cocoapods, material-design
Fab
πŸ›οΈ A Floating Action Button for macOS. Inspired by Material Design, and written in Swift.
Stars: ✭ 24 (-90.12%)
Mutual labels:  floatingactionbutton, fab
Floatingtoolbar
A toolbar that morphs from a FloatingActionButton
Stars: ✭ 1,540 (+533.74%)
Mutual labels:  fab, floatingactionbutton
Material Sheet Fab
Android library that provides the floating action button to sheet transition from Google's Material Design.
Stars: ✭ 1,584 (+551.85%)
Mutual labels:  material-design, fab
Quickactionview
View that shows quick actions when long pressed, inspired by Pinterest
Stars: ✭ 185 (-23.87%)
Mutual labels:  material-design, fab
Fabsmenu
A simple library to use a menu of FloatingActionButtons from Design Support Library that follow Material Design Guidelines
Stars: ✭ 324 (+33.33%)
Mutual labels:  fab, floatingactionbutton
Material Showcase Ios
✨ An elegant way to guide your beloved users in iOS apps - Material Showcase.
Stars: ✭ 300 (+23.46%)
Mutual labels:  cocoapods, material-design
Expandable Fab
A highly customizable 'speed dial' FloatingActionButton implementation.
Stars: ✭ 56 (-76.95%)
Mutual labels:  material-design, floatingactionbutton
Toolbar Button
FAB to Toolbar Button library for Android Material Collapsing Toolbar
Stars: ✭ 299 (+23.05%)
Mutual labels:  material-design, fab
Fabulousfilter
Android library to animate Floating Action Button to Bottom Sheet Dialog and vice-versa
Stars: ✭ 2,477 (+919.34%)
Mutual labels:  fab, floatingactionbutton
flutter fab dialer
Floating action button dialer
Stars: ✭ 66 (-72.84%)
Mutual labels:  floatingactionbutton, fab
Materialactivityindicator
Material Activity Indicator
Stars: ✭ 109 (-55.14%)
Mutual labels:  cocoapods, material-design
Materialfabspeeddial
Android UI library of FAB speed dial
Stars: ✭ 193 (-20.58%)
Mutual labels:  material-design, fab
Customfloatingactionbutton
This view is for replacement of standard Floating Action Button from Google Support Library. It is easy to use, customizable and you can also add text to button
Stars: ✭ 222 (-8.64%)
Mutual labels:  material-design, floatingactionbutton

JJFloatingActionButton

Floating Action Button for iOS


Swift 5.0 Version License Platform Build Status codecov Code Climate Documentation Contributions Welcome

Features β€’ Preview β€’ Requirements β€’ Installation β€’ Usage β€’ Author β€’ License

Features

  • Easy to use βœ“
  • Fully customizable βœ“
  • Place with auto layout βœ“
  • Design in Interface Builder βœ“
  • RTL language support βœ“
  • Handles Button with single Action βœ“
  • Works in Swift and Objective-C Projects βœ“
  • Comprehensive Test Coverage βœ“
  • Complete Documentation βœ“

Preview

Preview Basics Preview Configuration

Preview Circular Preview Single Item

Requirements

  • iOS 9.0+
  • Xcode 10.2+
  • Swift 5.0

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate JJFloatingActionButton into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'JJFloatingActionButton'
end

Then, run the following command:

$ pod install

Manually

If you prefer not to use a dependency manager, you can integrate JJFloatingActionButton into your project manually.

Usage

Quick Start

let actionButton = JJFloatingActionButton()

actionButton.addItem(title: "item 1", image: UIImage(named: "First")?.withRenderingMode(.alwaysTemplate)) { item in
  // do something
}

actionButton.addItem(title: "item 2", image: UIImage(named: "Second")?.withRenderingMode(.alwaysTemplate)) { item in
  // do something
}

actionButton.addItem(title: "item 3", image: nil) { item in
  // do something
}

view.addSubview(actionButton)
actionButton.translatesAutoresizingMaskIntoConstraints = false
actionButton.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -16).isActive = true
actionButton.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -16).isActive = true

// last 4 lines can be replaced with
// actionButton.display(inViewController: self)

Configuration

Button appearance and behavior can be customized:

actionButton.handleSingleActionDirectly = false
actionButton.buttonDiameter = 65
actionButton.overlayView.backgroundColor = UIColor(white: 0, alpha: 0.3)
actionButton.buttonImage = UIImage(named: "Dots")
actionButton.buttonColor = .red
actionButton.buttonImageColor = .white
actionButton.buttonImageSize = CGSize(width: 30, height: 30)

actionButton.buttonAnimationConfiguration = .transition(toImage: UIImage(named: "X"))
actionButton.itemAnimationConfiguration = .slideIn(withInterItemSpacing: 14)

actionButton.layer.shadowColor = UIColor.black.cgColor
actionButton.layer.shadowOffset = CGSize(width: 0, height: 1)
actionButton.layer.shadowOpacity = Float(0.4)
actionButton.layer.shadowRadius = CGFloat(2)

actionButton.itemSizeRatio = CGFloat(0.75)
actionButton.configureDefaultItem { item in
    item.titlePosition = .trailing

    item.titleLabel.font = .boldSystemFont(ofSize: UIFont.systemFontSize)
    item.titleLabel.textColor = .white
    item.buttonColor = .white
    item.buttonImageColor = .red

    item.layer.shadowColor = UIColor.black.cgColor
    item.layer.shadowOffset = CGSize(width: 0, height: 1)
    item.layer.shadowOpacity = Float(0.4)
    item.layer.shadowRadius = CGFloat(2)
}

actionButton.addItem(title: "Balloon", image: UIImage(named: "Baloon")) { item in
    // Do something
}

let item = actionButton.addItem()
item.titleLabel.text = "Owl"
item.imageView.image = UIImage(named: "Owl")
item.buttonColor = .black
item.buttonImageColor = .white
item.buttonImageColor = CGSize(width: 30, height: 30)
item.action = { item in
    // Do something
}

Delegate

optional func floatingActionButtonWillOpen(_ button: JJFloatingActionButton)
optional func floatingActionButtonDidOpen(_ button: JJFloatingActionButton)
optional func floatingActionButtonWillClose(_ button: JJFloatingActionButton)
optional func floatingActionButtonDidClose(_ button: JJFloatingActionButton)

Example

To run the example project, just run the following command:

$ pod try JJFloatingActionButton

Resources

Author

Jochen Pfeiffer https://github.com/jjochen

License

JJFloatingActionButton is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].