Menu with a circular layout based on Macaw

Overview

FanMenu

Easily customizable floating circle menu created with Macaw


We are a development agency building phenomenal apps.




Travis CI Version Carthage Compatible License Platform Twitter

Usage

  1. Create UIView in your storyboard or programatically.
  2. Set FanMenu as UIView class.
  3. Set the button
fanMenu.button = FanMenuButton(
    id: "main",
    image: "plus",
    color: Color(val: 0x7C93FE)
)
  1. Set menu items
fanMenu.items = [
    FanMenuButton(
        id: "exchange_id",
        image: "exchange",
        color: Color(val: 0x9F85FF)
    ),
    ...
    FanMenuButton(
        id: "visa_id",
        image: "visa",
        color: Color(val: 0xF55B58)
    )
]
  1. Add an event handler
// call before animation
fanMenu.onItemDidClick = { button in
    print("ItemDidClick: \(button.id)")
}
// call after animation
fanMenu.onItemWillClick = { button in
    print("ItemWillClick: \(button.id)")
}
  1. Configure optional parameters
// distance between button and items
fanMenu.menuRadius = 90.0

// animation duration
fanMenu.duration = 0.35

// menu opening delay
fanMenu.delay = 0.05

// interval for buttons in radians
fanMenu.interval = (0, 2.0 * M_PI)

// menu background color
fanMenu.menuBackground = Color.red
  1. Useful methods
fanMenu.isOpen
fanMenu.open()
fanMenu.close()

Customization

FanMenu is created with Macaw, our vector graphics Swift library. Thanks to that, it can be easily modified and improved for your purposes.

All source code is located in one single file called FanMenu.swift. To modify the menu simply copy this file and apply necessary changes.

Examples

To try out the FanMenu examples:

  • Clone the repo git clone [email protected]:exyte/fan-menu.git
  • Open terminal and run cd <FanMenuRepo>/Example
  • Run pod install to install all dependencies
  • Run xed . to open project in the Xcode
  • Try it!

We have the following examples:

Installation

CocoaPods

pod 'FanMenu'

Carthage

github 'Exyte/fan-menu'

Manually

Drop FanMenu.swift into your project.

Requirements

  • iOS 9.0+ / macOS 10.12+
  • Xcode 10.2+
Comments
  • Menus been hidden after displayed, but clickable, animation is working also.

    Menus been hidden after displayed, but clickable, animation is working also.

    It may working in the example project, but not on new project. Latest Xcode new project with deployment target 10 Latest Master branch code.

    See the video in action. 1550933952454388.mp4.zip

    opened by libern 11
  • Change items array and re render

    Change items array and re render

    I have a custom fan menu based on CustomViewController.swift

    I need to use the menu in a non standard way where a user is presented with a first menu and on press will present a second menu.

    I have successfully closed the menu and switched the items but on opening the items are not still showing the first menu unless I use updateNode which completely re-instantiates the menu and places it according to the original position, which is not required at this point. (I moved the whole fanmenu on open)

    I tried implementing an updateScene function but this in turn eventually places the menu in it's original position.

    The updateScene tried:

    func updateScene() { var oContent = self.scene!.node.contents let buttonsNode = Group(contents: items.enumerated().map { (arg) -> Node in let (index, item) = arg return CustomButtonsScene(customMenu: self).createCustomButton(customMenu: self, data: item, index: index) }) oContent[0] = buttonsNode self.scene!.node.contents = oContent }

    func updateScene() { var oContent = self.scene!.node.contents let menuButton = CustomMenuButtonScene(radius: radius) oContent[0] = menuButton.node self.scene!.node.contents = oContent }

    Is there a way to render different items or change the class I previously set in IB?

    opened by kier70 9
  • Fix Carthage dependencies and images in other bundles

    Fix Carthage dependencies and images in other bundles

    Add explicit dependencies for carthage through Cartfile

    This fix issue when adding fan-menu to a project managing dependencies with carthage and not using Macaw yet. It allows carthage to detect Macaw as needed dependency and fixes build error when installing fan-menu.

    Change FanMenuButton’s image string to UIImage

    This allows to pass image from different bundle than the main bundle of the App.

    opened by zocario 7
  • Xcode 11.4 / Swift 5.2

    Xcode 11.4 / Swift 5.2

    Dear Fan-Menu team,

    i am trying out your interesting Pod on CocoaPods - alas it does not seem to compile with Xcode 11.4 Swift 5.2 respectively. Seems some incompatibility with the Macaw library, that was updated for Swift 5.2.

    Will there be an update to the FanMenu pod?

    Regards, Mike

    opened by ebeneezer 6
  • Errors compiling the example.

    Errors compiling the example.

    I receive the following warning and error when I try and build the example in Xcode 10.1.

    1. Target 'FanMenu' (project 'Pods') has copy command from '/Users/martin/dev/fan-menu/Sources/Info.plist' to '/Users/martin/Library/Developer/Xcode/DerivedData/Example-fykvmcsmliphikcyocogamyeedyl/Build/Products/Debug-iphonesimulator/FanMenu/FanMenu.framework/Info.plist'

    2. Target 'FanMenu' (project 'Pods') has process command with output '/Users/martin/Library/Developer/Xcode/DerivedData/Example-fykvmcsmliphikcyocogamyeedyl/Build/Products/Debug-iphonesimulator/FanMenu/FanMenu.framework/Info.plist'

    opened by mcroker 5
  • iTunes Connect upload error : CFBundleIdentifier Collision

    iTunes Connect upload error : CFBundleIdentifier Collision

    Uploading my app on iTunes Connect is giving an error with the FanMenu framework used inside, (integrated through Carthage)

    ERROR ITMS-90685: "CFBundleIdentifier Collision. There is more than one bundle with the CFBundleIdentifier value 'com.exyte.Macaw' under the iOS application 'MyApp.app'." ERROR ITMS-90205: "Invalid Bundle. The bundle at 'MyApp.app/Frameworks/FanMenu.framework' contains disallowed nested bundles." ERROR ITMS-90206: "Invalid Bundle. The bundle at 'MyApp.app/Frameworks/FanMenu.framework' contains disallowed file 'Frameworks'."

    Is it something that you're aware of ?

    opened by remithaunay 5
  • Build failed after integrated

    Build failed after integrated

    image

    
    Showing All Messages
    :-1: Multiple commands produce '/Users/Libern/Library/Developer/Xcode/DerivedData/Sparkle-eluqypnvotfmphgsbcljsqmyugvd/Build/Products/Debug-iphoneos/FanMenu/FanMenu.framework/Info.plist':
    1) Target 'FanMenu' (project 'Pods') has copy command from '/Users/Libern/LibernWorking/Projects/Someline/sparkle-ios/Pods/FanMenu/Sources/Info.plist' to '/Users/Libern/Library/Developer/Xcode/DerivedData/Sparkle-eluqypnvotfmphgsbcljsqmyugvd/Build/Products/Debug-iphoneos/FanMenu/FanMenu.framework/Info.plist'
    2) Target 'FanMenu' (project 'Pods') has process command with output '/Users/Libern/Library/Developer/Xcode/DerivedData/Sparkle-eluqypnvotfmphgsbcljsqmyugvd/Build/Products/Debug-iphoneos/FanMenu/FanMenu.framework/Info.plist'
    
    opened by libern 4
  • View overlapped

    View overlapped

    HI! I found that when creating a view on the top for menu use, then it will cover the content from the bottom and the bottom view cannot click or slide. Is there an alternative way to make it??

    Thank you!!

    opened by WayneSKK 4
  • incomplete warning

    incomplete warning

    print("WARNING: FanMenu doesn't fit into view bounds. It should be at least ((fanMenu.menuRadius + fanMenu.radius) * 2.0) wide and in high")

    opened by perbrondum 3
  • Minimum deployment target

    Minimum deployment target

    Hello. The README says min deployment target is iOS 8.0 My project's min deployment target is 9.0, yet I am getting this error using cocoa pods:

    [!] CocoaPods could not find compatible versions for pod "FanMenu":
      In Podfile:
        FanMenu (from `https://github.com/exyte/fan-menu`)
    
    Specs satisfying the `FanMenu (from `https://github.com/exyte/fan-menu`)` dependency were found, but they required a higher minimum deployment target.
    
    opened by Natelegreat1 3
  • Add Cartfile and remove carthage copy phase

    Add Cartfile and remove carthage copy phase

    Add explicit dependencies using Cartfile so Carthage can detect Macaw dependency when bootstraping / updating.

    Remove copy framework phase of Carthage as it should be added in the final Application using frameworks, not the library itself. This copy phase of Macaw was leading to have twice the framework in final App.

    opened by zocario 3
  • Sorry to use this but this is the only way I can message you I don’t have your Twitter or discord or phone number

    Sorry to use this but this is the only way I can message you I don’t have your Twitter or discord or phone number

    Can you please make one with a lot of switches like different stiles and check boxes and drop down menus and more please it will help me I’m making a app but idk how to do it please it can be done around in 1 month if you can do and can I get your PayPal to make a donate button for you please it will be in my app

    opened by frayray909090 0
  • fanMenu.onItemWillClick doesn't call when click on  fan menu button items

    fanMenu.onItemWillClick doesn't call when click on fan menu button items

    Hi first of all thanks for this wonderful component, it would be very nice if we could have better access when click on one of items at fan menu , there isn't any callback method fire

    opened by sarakhater 1
  • add method so we can change the image of FanMenuButton

    add method so we can change the image of FanMenuButton

    Hi first of all thanks for this wonderful component, it would be very nice if we could have better access to the image view of FanMenuButton. for example we could change the image or set the font for the title label. I think that way you can not use struct for FanMenuButton

    opened by amirtutunchi 1
Owner
Exyte
Exyte
A radial/circular menu featuring spring animations.

ALRadialMenu A radial/circular menu featuring spring animations. Written in swift. Experimenting with fluent interfaces (https://github.com/vandadnp/s

Alex Littlejohn 50 Jul 1, 2022
Grid and Circular Menu for iOS.

IGCMenu IGCMenu library gives easy way to create Grid and Circular menu in app. This is light weight and highly customisable menu.Support iOS 7 and ab

Sunil Sharma 138 Nov 14, 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
PagingKit provides customizable menu UI. It has more flexible layout and design than the other libraries.

PagingKit provides customizable menu & content UI. It has more flexible layout and design than the other libraries. What's this? There are many librar

Kazuhiro Hayashi 1.3k Jan 9, 2023
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
A menu based on Medium iOS app.

Medium 1.8.168 menu in Swift. That is still one of my favorite menus because that is easy to use and looks beautiful.

Hiroki Nagasawa 322 May 28, 2022
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
A swift library based on the various options menu in material design in Android

KTOptionMenu Description KTOptionMenu is a swift library based on the various options menu in material design in Android that allows you to easily cre

null 1 Jul 21, 2022
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

Ashish Kakkad 281 Jan 5, 2023
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

Evgeny Nazarov 1.8k Dec 21, 2022
Our Guillotine Menu Transitioning Animation implemented in Swift reminds a bit of a notorious killing machine.

GuillotineMenu.swift Inspired by this project on Dribbble Also, read how it was done in our blog Requirements iOS 8.0+ Xcode 10 Swift 5.0 (v 4.1+) Swi

Yalantis 2.9k Dec 13, 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
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
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
A fully customizable popup style menu for iOS 😎

Guide Check out the documentation and guides for details on how to use. (Available languages:) English 简体中文 What's a better way to know what PopMenu o

Cali Castle 1.5k Dec 30, 2022