hintoz / dtzfloatingactionbutton Goto Github PK
View Code? Open in Web Editor NEWFloating button for your ios app in swift.
License: MIT License
Floating button for your ios app in swift.
License: MIT License
Are there any code examples of how to show multiple buttons (like the google screenshot in the Readme)? I'm trying to do so with the following:
let actionButton = DTZFloatingActionButton()
actionButton.handler = {
button in
}
let dropPinButton = DTZFloatingActionButton()
actionButton.handler = {
button in
}
let camerButton = DTZFloatingActionButton()
actionButton.handler = {
button in
}
let views = ["actionButton": actionButton, "dropPinButton": dropPinButton, "camerButton": camerButton]
let constraints = NSLayoutConstraint.constraints(withVisualFormat: "V:[actionButton]-[dropPinButton]-[camerButton]", options: .alignAllTrailing, metrics: nil, views: views)
`
view.addSubview(actionButton)
view.addSubview(dropPinButton)
view.addSubview(camerButton)
NSLayoutConstraint.activate(constraints)
And there are Autolayout issues with NSAutoresizingMaskLayoutConstraint. Setting translatesAutoresizingMaskIntoConstraints = false
does not work (the buttons do not show up on the screen)
I have the floating action button on top of a map, it's used to convert the map type from standard to satellite.
I have a slide up view that comes from the bottom of the screen, but when it slides up the button appears on top of it. I'm able to hide the button when the view has slid all the way open, but if the user is dragging the view slowly, they will see that the button is on top of it. Is there a way to set the z index so it can always be behind the slide up view?
Thanks and great job on this project!
Hi,
I have tried using the following code:
actionButton.handler = { button in print("Hi!") }
But it's not working. It's passing the click event to the Google Map. Any idea to achieve this?
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.