GithubHelp home page GithubHelp logo

anmolrajpal / menucontroller Goto Github PK

View Code? Open in Web Editor NEW
18.0 1.0 2.0 1.08 MB

An easy-to-use Action Menu Modal Controller inspired by iOS 13 Apple's native app implementation

License: MIT License

Swift 100.00%
menucontroller ios13-menu uimenucontroller uicontrolmenuaction swift modal-menu menu-sheet

menucontroller's Introduction

MenuController

An easy-to-use Action Menu Modal Controller inspired by iOS 13 Apple's native app implementation

Swift Version License PRs Welcome

Features

  • Supports Portrait and Landscape orientation
  • Glossy vibrant dark menu
  • Infinite Actions

Usage

import MenuController

let actions:[UIControlMenuAction] = [
    UIControlMenuAction(title: "Send Message", image: UIImage(systemName: "paperplane")!, handler: { _ in print("Sending Message") }),
    UIControlMenuAction(title: "Enable Wifi", image: UIImage(systemName: "wifi")!, handler: { _ in print("Wifi ON") }),
    UIControlMenuAction(title: "Delete", image: UIImage(systemName: "trash.fill")!, handler: { _ in print("Deleted โœ…") })
]

let vc = MenuController(actions: actions)
self.present(vc, animated: true, completion: nil)

Requirements

  • iOS 13.0+
  • Xcode 11

Installation

Swift Package Manager:

dependencies: [
    .package(url: "https://github.com/anmolrajpal/MenuController", from: "1.0.0")
]

Menu Controller Demo

Meta

@ArAnmol

https://github.com/anmolrajpal/MenuController

menucontroller's People

Contributors

anmolrajpal avatar

Stargazers

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

Watchers

 avatar

menucontroller's Issues

Ideas for future

  • Support dark/light mode;
  • Support sections (Group rows in sections like In Apple Notes app);
  • Support color of Title and Image for each row (like In Apple Notes app);
  • Add delegate to detect when Menu is (shown, expanded, minimized).

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.