Easy-to-use action menu

Overview

About

Navigate

Features

  • Highly customizable

    • support dark/light theme
    • corner radius
    • blured background
    • width (iPad)
    • various positions

    Item config

    Item type

    - ActionCell
    - Title
    - Spacer
    - InfoCell
    - TextFieldCell
    - SwitchCell
    - SegmentCell

    Action item color

    - standard
    - clear
    - filled
    - tinted
    - custom

    Action item Layout

    - Icon_Title (Icon left, title right)
    - Title_Icon (Title left, Icon right)

    Action item height

    - compact
    - standard
    - big

    Spacer type

    - empty
    - line
    - dashedLine
    - divider

Installation

Put Sources folder in your Xcode project. Make sure to enable Copy items if needed.

Usage

let actions: [UIFloatMenuAction] = [
    .init(item: .Title("Title")),
    .init(item: .SegmentCell(items: ["Item 1", UIImage(systemName: "bookmark")!, "Item 3"], selected: 1, action: #selector(segmentAction))),
    .init(item: .SwitchCell(icon: UIImage(systemName: "bookmark")!, title: "Switch 1", action: #selector(switchAction))),
    .init(item: .InfoCell(icon: UIImage(systemName: "questionmark.square")!, title: "Data title", label: .config(fontSize: 15, fontWeight: .semibold))),
    .init(item: .Spacer(type: .divider)),
    .init(item: .Title("Title")),
    .init(item: .ActionCell(icon: UIImage(systemName: "arrow.down.square.fill")!, title: "Title", layout: .Icon_Title), itemColor: .tinted(.systemBlue), action: { _ in
        print("Action")
    }),
    .init(item: .Spacer(type: .line())),
    .init(item: .ActionCell(icon: UIImage(systemName: "arrow.right.square.fill")!, title: "Title", subtitle: "Test subtitle", layout: .Icon_Title), itemColor: .filled(.systemPurple), action: { _ in
        print("Action")
    })
]
        
let menu = UIFloatMenu.setup(actions: actions)
menu.header.title = "UIFloatMenu title"
menu.header.subTitle = "UIFloatMenu subtitle"
menu.header.showHeader = true
menu.header.showLine = true
menu.header.lineInset = 15
menu.config.cornerRadius = 12
menu.config.blurBackground = true
menu.config.viewWidth_iPad = 350
menu.config.presentation = .default
menu.delegate.close = self
menu.show(self)

Delegate

To know when menu is closed, set the delegate with protocol UIFloatMenuCloseDelegate:

menu.delegate.close = self
func UIFloatMenuDidCloseMenu() {
    print("didCloseMenu - MenuClosed")
}

To get UITextField data, set the delegate with protocol UIFloatMenuTextFieldDelegate:

menu.delegate.textField = self
func UIFloatMenuGetTextFieldData(_ data: [String]) {
    print("TextField -", data)
}
You might also like...
An iOS drop down menu with pretty animation and easy to customize.
An iOS drop down menu with pretty animation and easy to customize.

IGLDropDownMenu An iOS drop down menu with pretty animation. Screenshot How To Use Use CocoaPods: pod 'IGLDropDownMenu' Manual Install: Just drap the

An easy to use and setup floating view for your app. 🎡
An easy to use and setup floating view for your app. 🎡

HHFloatingView An easy to use and setup floating view for your app. 🎡 Installation Manually - Add HHFloatingView/Source folder to your Project. And y

Drawer view controller that easy to use!
Drawer view controller that easy to use!

KWDrawerController Drawer view controller that is easy to use! Installation CocoaPods (iOS 8+ projects) KWDrawerController is available on CocoaPods.

A fun, easy-to-use tab bar navigation controller for iOS.
A fun, easy-to-use tab bar navigation controller for iOS.

CircleBar Don’t you, sometimes, miss fun user interfaces? Truth is, we do. Sure, you can't use them in enterprise apps for obvious reasons, but if you

Drawer view controller that easy to use!
Drawer view controller that easy to use!

KWDrawerController Drawer view controller that is easy to use! Installation CocoaPods (iOS 8+ projects) KWDrawerController is available on CocoaPods.

Slide Menu (Drawer) in Swift
Slide Menu (Drawer) in Swift

AKSwiftSlideMenu Slide Menu (Drawer) in Swift 5.0 Why to use a library everytime? Let's create our own Slide Menu in Swift 5.0 I have uploaded a video

⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion
⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion

CIRCLE MENU Simple, elegant UI menu with a circular layout and material design animations We specialize in the designing and coding of custom UI for M

A simple side menu for iOS written in Swift.
A simple side menu for iOS written in Swift.

ENSwiftSideMenu A lightweight flyover side menu component for iOS with the UIDynamic's bouncing animation, UIGestures and UIBlurEffect. Allows you to

Menu with a circular layout based on Macaw
Menu with a circular layout based on Macaw

FanMenu Easily customizable floating circle menu created with Macaw We are a development agency building phenomenal apps. Usage Create UIView in your

Releases(1.0.6.1)
  • 1.0.6.1(Nov 8, 2022)

  • 1.0.6(Nov 4, 2022)

    • Added double action items
    .init(item: .ActionCell(selection: .multi(isSelected: true,
                                              selectedIcon: UIImage(systemName: "star.slash"), selectedTitle: "Unstar",
                                              defaultIcon: UIImage(systemName: "star"), defaultTitle: "Star")), 
          action: { action in
        if action.isSelected ?? false {
            print("item Unstar")
        } else {
            print("item Star")
        }
    }),
    
    • Add queue (visual settings taken from initial view)
    let header = UIFloatMenuHeaderConfig(title: "Activity", showLine: true)
    UIFloatMenu.showNext(actions: style_actions, presentation: .center, header: header)
    
    • Added custom view cell
    .init(item: .CustomCell(view: CustomViewRow(title: "Custom rows", subtitle: "View custom rows", icon: UIImage(systemName: "tablecells")!)), action: { _ in
    })
    
    • Find specific TextField row by identifier
    // Setup cell
    .init(item: .TextFieldCell(placeholder: "Login", identifier: "Login"))
    
    // Delegate
    func UIFloatMenuGetTextFieldData(_ rows: [TextFieldRow]) {
        let login = UIFloatMenuHelper.find(rows, by: "Login")
        let password = UIFloatMenuHelper.find(rows, by: "Password")
    
        print("Login -", login)
        print("Password -", password)
    }
    
    • Show alert
    let alert = UIAlertController(title: "Delete", message: "message", preferredStyle: .alert)
    alert.addAction(UIAlertAction(title: "Cancel", style: .cancel))
    UIFloatMenuHelper.showAlert(alert)
    
    • Fixed action completion after tap
    Source code(tar.gz)
    Source code(zip)
  • 1.0.5(Mar 22, 2022)

    • Fixed double called DidCloseMenu
    • Added horizontal cell Compact (Added Horizontal cell layout) Standard
    • Added UIPointerInteraction support

    .init(item: .HorizontalCell(items: h_actions_compact, height: .compact, layout: .Title_Icon))

    Source code(tar.gz)
    Source code(zip)
  • 1.0.4(Mar 16, 2022)

  • 1.0.3(Mar 7, 2022)

  • 1.0.2(Mar 3, 2022)

    • Added Compact item height
    • Code reduced

    Example

    .ActionCell(title: "Standard item", height: .standard)
    .ActionCell(title: "Compact item", height: .compact)
    
    Source code(tar.gz)
    Source code(zip)
Owner
Vlad Karlugin
Vlad Karlugin
SwiftySideMenu is a lightweight and easy to use side menu controller to add left menu and center view controllers with scale animation based on Pop framework.

SwiftySideMenu SwiftySideMenu is a lightweight, fully customizable, and easy to use controller to add left menu and center view controllers with scale

Hossam Ghareeb 84 Feb 4, 2022
JNDropDownMenu - Easy to use TableView style dropdown menu.

Overview Swift version of https://github.com/dopcn/DOPDropDownMenu Easy to use TableView style dropdown menu. Setup The only thing you

Javal Nanda 65 Jun 27, 2021
An easy way to use `canPerformAction` for context menu in SwiftUI.

Use canPerformAction for TextField/Editor in SwiftUI You know how a TextField displays a set of context menu? It doesn't matter if it's UIKit or Swift

StuFF mc 5 Dec 18, 2021
Control your display's brightness from the macOS menu bar. Simple and easy to use.

MonitorControl Lite Control your display's brightness from the macOS menu bar. Simple and easy to use. About MonitorControl Lite is a simplified versi

null 62 Dec 11, 2022
A Slide Menu, written in Swift, inspired by Slide Menu Material Design

Swift-Slide-Menu (Material Design Inspired) A Slide Menu, written in Swift 2, inspired by Navigation Drawer on Material Design (inspired by Google Mat

Boisney Philippe 90 Oct 17, 2020
Slide-Menu - A Simple Slide Menu With Swift

Slide Menu!! Весь интерфейс создан через код

Kirill 0 Jan 8, 2022
EasyMenu - SwiftUI Menu but not only button (similar to the native Menu)

EasyMenu SwiftUI Menu but not only button (similar to the native Menu) You can c

null 10 Oct 7, 2022
Swift-sidebar-menu-example - Create amazing sidebar menu with animation using swift

 SWIFT SIDEBAR MENU EXAMPLE In this project I create a awesome side bar menu fo

Paolo Prodossimo Lopes 4 Jul 25, 2022
Hamburger Menu Button - A hamburger menu button with full customization

Hamburger Menu Button A hamburger menu button with full customization. Inspired by VinhLe's idea on the Dribble How to use it You can config the looks

Toan Nguyen 114 Jun 12, 2022
UIMenuItem with image and closure(block) action

MenuItemKit MenuItemKit provides image and block(closure) support for UIMenuItem. MenuItemKit is a Swift project but Objective-C is supported without

Realazy Xian-an CHEN 844 Dec 22, 2022