FloatingActionSheetController is a cool design ActionSheetController library written in Swift2.

Overview

FloationgActionSheetController

Platform Language CocoaPods Shield Carthage compatible License

FloatingActionSheetController is a cool design ActionSheetController library written in Swift2.

Overview

Requirements

  • Xcode 8+
  • Swift3
  • iOS 8.0+

Installation

CocoaPods

# Podfile
use_frameworks!
target 'YOUR_TARGET_NAME' do
  pod "FloatingActionSheetController"
end

Carthage

# Cartfile
github "ra1028/FloatingActionSheetController"

Usage

Import FloationgActionSheetController at first.

import FloatingActionSheetController

example

let action1 = FloatingAction(title: "title") { action in
    // Do something.
}
let action2 = FloatingAction(title: "title") { action in
    // Do something.
}
let action3 = FloatingAction(title: "title", handleImmediately: true) { action in
    // Do something.
    // If set to 'true' the handleImmediately, handler will be execute soon when Action was select.
}
let group1 = FloatingActionGroup(action: action1)
let group2 = FloatingActionGroup(action: action2, action3)
FloatingActionSheetController(actionGroup: group1, group2)
    .present(in: self)

We have prepared a rich initializer to each Class. Please refer to the demo app and source code.

animations

Custom animation styles. Please check the overview or demo app for animation details

public enum AnimationStyle {
    case slideUp
    case slideDown
    case slideLeft
    case slideRight
    case pop
}

How to use

FloatingActionSheetController(actionGroup: group, animationStyle: .slideLeft)
let actionSheet = FloatingActionSheetController(actionGroup: group)
actionSheet.animationStyle = .slideLeft

appearance customization

let actionSheet = FloatingActionSheetController(actionGroup: group1)
// Color of action sheet
actionSheet.itemTintColor = .white
// Color of title texts
actionSheet.textColor = .black
// Font of title texts
actionSheet.font = .boldSystemFont(ofSize: 15)
// background dimming color
actionSheet.dimmingColor = UIColor(white: 1, alpha: 0.7)

If you wants to customize FloatingAction individually.

var action = FloatingAction(title: "title") { action in
    // Do something.
}
action.tintColor = .whiteColor()
action.textColor = .blackColor()
action.font = .boldSystemFont(ofSize: 15)

License

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

You might also like...
FCAlertView is a Flat Customizable AlertView for iOS (Written in Objective C)
FCAlertView is a Flat Customizable AlertView for iOS (Written in Objective C)

FCAlertView FCAlertView is a Flat Customizable AlertView, written in Objective C Quick Links 1. Swift 2. Installation 3. Example App 4. Adding FCAlert

TTGSnackbar shows simple message and action button on the bottom or top of the screen with multi kinds of animation, which is written in Swift3 and inspired by Snackbar in Android. It also support showing custom view, icon image or multi action button. Simple Alert View written in Swift, which can be used as a UIAlertController. (AlertController/AlertView/ActionSheet)
Simple Alert View written in Swift, which can be used as a UIAlertController. (AlertController/AlertView/ActionSheet)

DOAlertController Simple Alert View written in Swift, which can be used as a UIAlertController replacement. It supports from iOS7! It is simple and ea

😍A simple NoticeBar written by Swift 3, similar with QQ notice view.
😍A simple NoticeBar written by Swift 3, similar with QQ notice view.

NoticeBar 😍 A simple NoticeBar written by Swift 3, similar with QQ notice view. 😀 ScreenShots Remember: If you want the status bar style change, you

A Google like action sheet for iOS written in Swift.
A Google like action sheet for iOS written in Swift.

MaterialActionSheetController Lightweight and totally customizable. Create and present it the way you do with UIAlertController. Screenshots Demo | De

Advance animated alerts for iOS written in Swift
Advance animated alerts for iOS written in Swift

LIHAlert LIHAlert provides animated banners for iOS. Updated to Swift 3 Demo Project The LIHAlert workspace contains a demo project, also used for dev

Beautiful animated Login Alert View. Written in Objective-C

UIAlertView - Objective-C Animated Login Alert View written in Swift but ported to Objective-C, which can be used as a UIAlertView or UIAlertControlle

Animated Alert written in SwiftUI.
Animated Alert written in SwiftUI.

TransactionAlert Animated Alert written in SwiftUI. Easy to use Get Started Add a TAViewModel instance as an environment object to your Root View in y

A simple custom popup dialog view for iOS written in Swift. Replaces UIAlertController alert style.
A simple custom popup dialog view for iOS written in Swift. Replaces UIAlertController alert style.

A simple custom popup dialog view for iOS written in Swift. Replaces UIAlertController alert style.

Comments
  • Compile error in Swift 3.0.2

    Compile error in Swift 3.0.2

    I got this compile error: overriding var must be as accessible as its enclosing type

    The problem is related to the property isHighlighted of the class ActionButton: it can't be less visible than the superclass.

    Please fix it, Thank you

    opened by gianfilippocisternino 3
  • Allow user to choose whether or not the parent view controller should be scaled

    Allow user to choose whether or not the parent view controller should be scaled

    This is a fantastic library, but for my case, I didn't want the fromVC (Parent View Controller) to scale because it looked awkward given my situation. The following code is completely backwards compatible, so anyone gets these changes won't see their code break.

    I contemplated whether I should simply ask the user if they want the parent view controller to be scaled or if I should allow them to pass in a CGFloat which defines the scale (by default, you choose 0.85, but the user would be able to choose 1, 0.90, 0.50, etc.). I decided to go against that because while it is simple to introduce, I'd like to think the library as it stands is pretty awesome :).

    opened by dilizarov 0
  • Add completion closure for dismissal

    Add completion closure for dismissal

    In many cases the calling controller would like to be able to be notified or run code when the FloatingActonSheetController is dismissed. Currently dismissActionSheet method has this closure but it is private and its also called internally making it a less simple change to reliably make and PR.

    Feature request is to allow the calling code to set this closure so that when the FloatingActionSheetController is dismissed its closure is executed, allowing the calling code to react.

    The button based callbacks are almost an analog but if you tap outside the buttons to close without action there is no closure to catch this action.

    opened by siberian1967 1
Owner
Ryo Aoyama
░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░▀▄░░░▄▀░░░░░░░ ░░░░░▄█▀███▀█▄░░░░░ ░░░█▀███████▀█░░░ ░░░█░█▀▀▀▀▀▀▀█░█░░░ ░░░░░░░▀▀░░░▀▀░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░
Ryo Aoyama
A Swift library to design custom prompts with a great scope of options to choose from.

Installation CocoaPods Install with CocoaPods by adding the following to your Podfile: source 'https://github.com/CocoaPods/Specs.git' platform :ios,

Gabriel Alvarado 736 Nov 3, 2022
Toasts and popups library written with SwiftUI

Popup View Toasts and popups library written with SwiftUI We are a development agency building phenomenal apps. Usage Put all your body code into a ZS

Exyte 1.9k Jan 5, 2023
GUI library for displaying various popups (HUD), written in pure Swift.

SwiftNotice SwiftNotice is a GUI library for displaying various popups (HUD) written in pure Swift, fits any scrollview and supports iPhone X. Feature

John Lui 838 Dec 9, 2022
Highly customizable alertview and alert/notification/success/error/alarm popup written in Swift

CDAlertView is highly customizable alert popup written in Swift. Usage is similar to UIAlertController. Screenshots Animations Usage Basic usage witho

Candost Dagdeviren 1.1k Dec 30, 2022
A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style.

Introduction Popup Dialog is a simple, customizable popup dialog written in Swift. Features Easy to use API with hardly any boilerplate code Convenien

Orderella Ltd. 3.8k Dec 20, 2022
Beautiful animated Alert View. Written in Swift

SCLAlertView Animated Alert View written in Swift, which can be used as a UIAlertView or UIAlertController replacement. Since UIAlertView is deprecate

Viktor Radchenko 5.2k Jan 3, 2023
Live animated Alert View for iOS written in Swift

Sweet Alert iOS Beautiful Animated custom Alert View inspired from javascript library SweetAlert. Written in Swift this SweetAlertView can be used in

Sahil 2k Dec 22, 2022
Fully customizable and extensible action sheet controller written in Swift

XLActionController By XMARTLABS. XLActionController is an extensible library to quickly create any custom action sheet controller. Examples The action

xmartlabs 3.3k Dec 31, 2022
A message bar for iOS written in Swift.

Dodo, a message bar for iOS / Swift This is a UI widget for showing text messages in iOS apps. It is useful for showing short messages to the user, so

Evgenii Neumerzhitckii 874 Dec 13, 2022
A message bar for iOS written in Swift.

Dodo, a message bar for iOS / Swift This is a UI widget for showing text messages in iOS apps. It is useful for showing short messages to the user, so

Evgenii Neumerzhitckii 874 Dec 13, 2022