- July 26, 2025
- Mins Read
UIView
in your storyboard or programatically.FanMenu
as UIView
class.
fanMenu.button = FanMenuButton(
id: “main”,
image: “plus”,
color: Color(val: 0x7C93FE)
)
fanMenu.items = [
FanMenuButton(
id: “exchange_id”,
image: “exchange”,
color: Color(val: 0x9F85FF)
),
…
FanMenuButton(
id: “visa_id”,
image: “visa”,
color: Color(val: 0xF55B58)
)
]
// call before animation
fanMenu.onItemDidClick = { button in
print(“ItemDidClick: \(button.id)”)
}
// call after animation
fanMenu.onItemWillClick = { button in
print(“ItemWillClick: \(button.id)”)
}
// 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
fanMenu.isOpen
fanMenu.open()
fanMenu.close()
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.
To try out the FanMenu examples:
git clone git@github.com:exyte/fan-menu.git
cd <FanMenuRepo>/Example
pod install
to install all dependenciesxed .
to open project in the XcodeWe have the following examples:
pod ‘FanMenu’
github ‘Exyte/fan-menu’
Drop FanMenu.swift into your project.
NavigationKit is a lightweight library which makes SwiftUI navigation super easy to use. 💻 Installation 📦 Swift Package Manager Using Swift Package Manager, add ...
An alternative SwiftUI NavigationView implementing classic stack-based navigation giving also some more control on animations and programmatic navigation. NavigationStack Installation ...
With SwiftUI Router you can power your SwiftUI app with path-based routing. By utilizing a path-based system, navigation in your app becomes ...
This package takes SwiftUI's familiar and powerful NavigationStack API and gives it superpowers, allowing you to use the same API not just ...