andreamiotto / actionover Goto Github PK
View Code? Open in Web Editor NEWA custom SwiftUI modifier to present an ActionSheet or a Popover menu
License: MIT License
A custom SwiftUI modifier to present an ActionSheet or a Popover menu
License: MIT License
Hello, thanks for the great package. It says Mac compatible, but it is only building in iOS for me. It looks like the platforms array in Package.swift only has iOS listed, is that the issue?
I am in China, so the SwiftPM does not work.
So can you add cocoapods support?
ActionOverButton.title
is String
, but please support LocalizedStringKey
for localization as Text
do. ๐
How to show ActionOver menu after a click on a button from a previous ActionOver menu?
I have a couple of minor changes I would like to suggest that I have implemented on a branch. I can list them here or create a PR. Which do you prefer? I guess I need better access to create a PR?
This error appears when we use a variable in action.
For some reason, when I update to the latest code in XCode's SWP, the change made to ActionOverViewModifier line 156 has not been updated.
should be:
.padding(.all, 10)
code shows:
.padding(.vertical, 10)
Hello. I have installed this package as directed and have tried to follow your code example. Rather than put it directly into contentView, I have created an ActionButton with body as such...
var body: some View { Button( action: { self.showActions = true}, label: { Image(systemName: "plus").font(.title) } ) .actionOver( presented: $showActions, title: "Options", message: "", buttons: buttons, ipadAndMacConfiguration: ipadMacConfig ) }
I create ActionButton array as your sample shows and an ipadMacConfig.
The following errors appear:
Use of undeclared type 'ActionOverButton'
Use of unresolved identifier 'IpadAndMacConfiguration'
'actionOver' is inaccessible due to 'internal' protection level
I have tried importing ActionOver to no avail. Any ideas?
Cannot find 'self' in scope when calling finction on action handler.
var actionButtons: [ActionOverButton] = {
return [
ActionOverButton(
title: "Edit Profile",
type: .normal,
action: {}
),
ActionOverButton(
title: "Change Password",
type: .normal,
action: {}
),
ActionOverButton(title: "Sign out", type: .destructive) {
self.setting()
},
ActionOverButton(
title: nil,
type: .cancel,
action: nil
),
]
}()
private var ipadMacConfig = {
IpadAndMacConfiguration(anchor: nil, arrowEdge: nil)
}()
func setting() {
}
}
var actionButtons: [ActionOverButton] {
return [
ActionOverButton(
title: "Edit Profile",
type: .normal,
action: {}
),
ActionOverButton(
title: "Change Password",
type: .normal,
action: {}
),
ActionOverButton(title: "Sign out", type: .destructive) {
self.setting()
},
ActionOverButton(
title: nil,
type: .cancel,
action: nil
),
]
}
You seemed to have picked up an extra curly bracket on line 160 of ActionOverViewModifier.swift which causes a failure at compile time.
Andrea, thank you for this code! However, I am attempting to run it via Catalyst on my Mac and I am getting this error:
application requires at least OS X version 10.15.4 (10.15.4), but is being run on 10.15.3 ( 10.15.3/19D76), and so is exiting.
I am using Xcode 11.4.1 and have been able to run other Catalyst apps under 10.15.3 so what is the problem here? I've searched the code looking for special OS requirements but can't find any.
Now, before you suggest I update to 10.15.4 let me tell you my horror story. I did update to 10.15.4 and I have spent the last five days trying undo that foolish decision! 10.15.4 is a nightmare of bugs. Mail, Messages, Contacts, Spotlight, all break with the "not responding" status. I had an external boot disk with 10.15.3 but some obtuse security "feature" in 10.15.4 prevents using an external disk as a startup disk. After days of searching for a backdate solution I was finally able to restore my machine back to 10.15.3.
Any ideas?
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.