Skip to content

SwiftUI Menu but not only button. You can create custom Menu.

Notifications You must be signed in to change notification settings

hdehghan/EasyMenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyMenu

SwiftUI Menu but not only button (similar to the native Menu)

You can create custom Menu.

Important

This version is not compatible with NavigationView.toolbar

Installation

To use EasyMeny with a project targeting iOS 13, simply copy folder Source into your project.

Swift Package Manager

To integrate EasyMenu into your project using SwiftPM add the following to your Package.swift:

 dependencies: [
    .package(url: "https://github.com/hdehghan/EasyMenu", from: "0.1.0"),
],

Usage

To deploy this project run

EasyMenu {
    Group {
        HStack {
            Image(systemName: "sun.min.fill")
                .foregroundColor(Color(.secondaryLabel))
            Slider(value: .constant(0.5))
            Image(systemName: "sun.max.fill")
                .foregroundColor(Color(.secondaryLabel))
        }
        .padding(.horizontal)
        .frame(height: 50)
    }
                
    Divider()
                    
    Toggle("Show Translate", isOn: .constant(true))
        .padding(.horizontal)
        .frame(height: 54.0)
} label: {
    Image(systemName: "textformat.size")
}

Demo

image example

Requirements

EasyMenu Swift Xcode Platforms
EasyMenu 0.2 Swift 5.0 Xcode 12.0 iOS 13.0

Roadmap

  • Support DarkMode
  • Support macOS
  • Support NavigationView.toolbar

Communication

  • If you found a bug, open an issue or submit a fix via a pull request.
  • If you have a feature request, open an issue or submit a implementation via a pull request or hit me up on hd.dehghan@gmail.com or telegram..
  • If you want to contribute, submit a pull request onto the master branch.
  • Contributions are always welcome!