hdehghan / easymenu Goto Github PK
View Code? Open in Web Editor NEWSwiftUI Menu but not only button. You can create custom Menu.
SwiftUI Menu but not only button. You can create custom Menu.
How to show EasyMenu on screens main view? If we have like smaller subview with height 50, the EasyMenu displays within this view with some part of it showing and remaining hides due to subview less height.
'onChange(of:perform:)' is only available in macOS 11.0 or newer
File EasyMenu.swift
// MARK: Body
public var body: some View {
Button {
withAnimation(.easeInOut(duration: config.animationDuration)) {
showMenu.toggle()
}
} label: {
label
}
.onAppear(perform: {
#if os(macOS)
if let screen = NSScreen.main {
screenWidth = screen.frame.size.width
screenHeight = screen.frame.size.height
}
#else
screenWidth = UIScreen.main.bounds.size.width
screenHeight = UIScreen.main.bounds.size.height * 2
#endif
})
.overlay(backgroundOverlay())
.overlay(menuOverlay())
.onChange(of: isActive) { newValue in //// <<--- ERROR
withAnimation(.easeInOut(duration: config.animationDuration)) {
showMenu.toggle()
}
}
// .zIndex(Double.infinity)
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.