Interactive view transition to display menus with flowing and bouncing effects in Swift

Overview

FlowingMenu

Supported Platforms Version Swift Package Manager compatible Carthage compatible Build Status codecov.io codebeat badge

FlowingMenu provides an interactive transition manager to display menu with a flowing and bouncing effects. The Objective-C countepart is here https://github.com/yannickl/YLFlowingMenu.

FlowingMenu

RequirementsUsageInstallationContributionContactLicense

Requirements

  • iOS 9.0+
  • Xcode 9.0+
  • Swift 4.2+

Usage

At first, import FlowingMenu:

import FlowingMenu

Then just add a FlowingMenuTransitionManager object that acts as transitioningDelegate of the view controller you want display:

let flowingMenuTransitionManager = FlowingMenuTransitionManager()

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
  let vc                   = segue.destination
  vc.transitioningDelegate = flowingMenuTransitionManager
}

If you want interactive transition you will need to implement the FlowingMenuDelegate methods and defines the views which will interact with the gestures:

var menu: UIViewController?

override func viewDidLoad() {
  super.viewDidLoad()

  // Add the pan screen edge gesture to the current view
  flowingMenuTransitionManager.setInteractivePresentationView(view)

  // Add the delegate to respond to interactive transition events
  flowingMenuTransitionManager.delegate = self
}

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
  let vc                   = segue.destination
  vc.transitioningDelegate = flowingMenuTransitionManager

  // Add the left pan gesture to the menu
  flowingMenuTransitionManager.setInteractiveDismissView(vc.view)

  // Keep a reference of the current menu
  menu = vc
}

// MARK: - FlowingMenu Delegate Methods

func flowingMenuNeedsPresentMenu(_ flowingMenu: FlowingMenuTransitionManager) {
  performSegue(withIdentifier: "PresentSegueName", sender: self)
}

func flowingMenuNeedsDismissMenu(_ flowingMenu: FlowingMenuTransitionManager) {
  menu?.performSegue(withIdentifier: "DismissSegueName", sender: self)
}

Have fun! :)

For more information...

To go further, take a look at the documentation and the example project.

Note: All contributions are welcome

Installation

CocoaPods

Install CocoaPods if not already available:

$ [sudo] gem install cocoapods
$ pod setup

Go to the directory of your Xcode project, and Create and Edit your Podfile and add FlowingMenu:

$ cd /path/to/MyProject
$ touch Podfile
$ edit Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

use_frameworks!
pod 'FlowingMenu', '~> 3.1.0'

Install into your project:

$ pod install

Open your project in Xcode from the .xcworkspace file (not the usual project file):

$ open MyProject.xcworkspace

You can now import FlowingMenu framework into your files.

Carthage

Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate FlowingMenu into your Xcode project using Carthage, specify it in your Cartfile file:

github "yannickl/FlowingMenu" >= 3.1.0

Swift Package Manager

You can use The Swift Package Manager to install FlowingMenu by adding the proper description to your Package.swift file:

import PackageDescription

let package = Package(
    name: "YOUR_PROJECT_NAME",
    targets: [],
    dependencies: [
        .Package(url: "https://github.com/yannickl/FlowingMenu.git", versions: "3.1.0" ..< Version.max)
    ]
)

Note that the Swift Package Manager is still in early design and development, for more information checkout its GitHub Page.

Manually

Download the project and copy the FlowingMenu folder into your project to use it in.

Contribution

Contributions are welcomed and encouraged .

Contact

Yannick Loriot

License (MIT)

Copyright (c) 2015-present - Yannick Loriot

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • Did not call didSelectRowAtIndexPath delegate

    Did not call didSelectRowAtIndexPath delegate

    Hi Yannick, Did not call didSelectRowAtIndexPath delegate in MenuController class. I used:

    tapGesture.cancelsTouchesInView= false

    But I did not get success. What i do? Please help me sir.

    Khushi.

    opened by khushbooPS 3
  • Swift 3 Branch --> UIColor

    Swift 3 Branch --> UIColor

    https://github.com/mediatainment/FlowingMenu/blob/swift3/Sources/FlowingMenuTransitionManager.swift#L145

    remove the () at the end of the line...

    let shapeColor = source.colorOfElasticShapeInFlowingMenu(self) ?? menuView.backgroundColor ?? .black()

    opened by exocode 1
  • syntax fixes to swift 3 beta version

    syntax fixes to swift 3 beta version

    @yannickl hi I added new branch swift 3 and updated syntax and code changes to make it work on swift3 and xcode 8. You can create new branch swift3 and merge my branch swift3.

    opened by sairamkotha 1
  • Dismiss results in black screen (not original view)

    Dismiss results in black screen (not original view)

    iOS 13.4.1
    Xcode Version 11.4.1 (11E503a)
    iPhone 11 (simulator)
    FlowingMenuExample code
    
    

    On the demo project, when returning from the menu, the display is a black screen, not the original screen...

    any ideas?

    opened by jminutaglio 0
  • can't move to full screen on clicking the user

    can't move to full screen on clicking the user

    when I tried to move to next view controller after selecting the user the screen is still partial, I want to move to next view controller and it should be normal.i am using navigationcontroller, please give me the solution.

    saver

    opened by Bunnysrepo 0
  • Problem with UICustomObject:panToPresentAction

    Problem with UICustomObject:panToPresentAction

    Hi,

    I'm trying to set up this menu in my project. I tested the example and it works but when I try to reproduce it in my project, I have an error when I slide to open the menu.

    Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UICustomObject panToPresentAction:]: unrecognized selector sent to instance 0x1c40193d0'
    

    I think I forgot something but I don't know what..

    Can you help me please ? :)

    opened by ins0u 2
  • Making it as menu

    Making it as menu

    Hey! I am trying to use this library as sideMenu. Like side tab bar however I am struggling with it. How would you implement lets say 2 buttons in menu and then present viewcontrollers accordingly? Since this library is made using unwind segues, I do not know much about them only that it basically makes the initial viewcontroller as initial viewcontroller.

    opened by MaeseppTarvo 0
Owner
Yannick Loriot
iOS developer and nodejs addict. Open-source lover and technology enthusiast.
Yannick Loriot
A not bad gooey effects menu.

带粘性的扇形菜单 Path menu with gooey effectes. 灵感来自这个Dribbble设计: Inspired by this dribbble: ###下面是实现的效果: ###Here is what the repo can do: 1、点击每个具体的菜单可以获得相应的编

Qitao Yang 1.9k Dec 5, 2022
iOS Interactive Side Menu written in Swift.

Interactive Side Menu A customizable, interactive, auto expanding and collapsing side menu for iOS written in Swift. Here are some of the ways Interac

Handsome 706 Dec 15, 2022
Custom transition between controllers. Settings controller for your iOS app.

SPLarkController About Transition between controllers to top. You can change animatable height after presentation controller. For presentation and dis

Ivan Vorobei 965 Dec 17, 2022
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
The elegant yet functional dropdown menu, written in Swift, appears underneath the navigation bar to display a list of defined items when a user clicks on the navigation title.

Introduction The elegant yet functional dropdown menu, written in Swift, appears underneath the navigation bar to display a list of defined items when

Tho Pham 2.7k Dec 28, 2022
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram)

Unfortunately, life gets in the way sometimes and I won't be able to maintain this library any longer and upgrade this library to where it needs to be

null 5.2k Dec 31, 2022
XLPagerTabStrip is a Container View Controller that allows us to switch easily among a collection of view controllers

XLPagerTabStrip is a Container View Controller that allows us to switch easily among a collection of view controllers. Pan gesture can be used to move on to next or previous view controller. It shows a interactive indicator of the current, previous, next child view controllers.

xmartlabs 6.8k Dec 27, 2022
slider view for choosing categories. add any UIView type as category item view. Fully customisable

CategorySliderView Horizontal or vertical slider view for choosing categories. Add any UIView type as category item view. Fully customisable Demo Inst

Cem Olcay 353 Nov 6, 2022
Swipable tab and menu View and ViewController.

SwipeMenuViewController Overview SwipeMenuViewController provides SwipeMenuView and SwipeMenuViewController. This is very useful to build swipe-based

Yusuke Morishita 1.2k Dec 29, 2022
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
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

Hemang 95 Dec 15, 2022
Simple example of view that appears on tap button and dismiss with swipe gesture.

MenuWithSlide Simple SwiftUI example of how to show side menu with slide effect. On button press - appeares, on background tap or swipe right - dissmi

Evgeny 1 Nov 29, 2021
iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift.

SlideMenuControllerSwift iOS Slide View based on iQON, Feedly, Google+, Ameba iPhone app. Installation CocoaPods pod 'SlideMenuControllerSwift' Carth

Yuji Hato 3.3k Dec 29, 2022
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.

Jungwon An 157 Jun 14, 2022
A paging view controller with a highly customizable menu ✨

Getting Started | Customization | Installation Features Parchment lets you page between view controllers while showing any type of generic indicator t

Martin Rechsteiner 3k Jan 8, 2023
Mac menu bar tool to view the architecture of the running application

Silicon Info About Silicon Info is a tiny menu bar application allows the user to quickly view the architecture of the currently running application.

William Castelli (Billy) 260 Dec 29, 2022
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.

Jungwon An 157 Jun 14, 2022
Weather Dock is a MacOS headless application that shows popover view under the menu bar with weather info.

Weather Dock Weather forecast in MacOS menu bar Weather Dock is a MacOS headless application that shows popover view under the menu bar with weather i

Alexander Stepanischev 8 Dec 15, 2022
⭕️ 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

Ramotion 3.4k Dec 29, 2022