Comments (4)
Thanks for pointing this out. The docs are outdated, and the parameter should be a binding CGFloat array, not an Int array. Try using .constant([...])
with your numbers inside there, like in this example.
from swiftui-drawer.
I tried to use this today and despite resolving all issues and using this example, all i got was an empty app. I don't think it's working out of the box in xcode 13
Drawer {
ZStack {
RoundedRectangle(cornerRadius: 12)
.foregroundColor(.white)
.shadow(radius: 100)
VStack(alignment: .center) {
Spacer().frame(height: 4.0)
RoundedRectangle(cornerRadius: 3.0)
.foregroundColor(.gray)
.frame(width: 30.0, height: 6.0)
Spacer()
}
}
}.edgesIgnoringSafeArea(.vertical)
.rest(at: .constant([100, 340, UIScreen.main.bounds.height - 40]))
.impact(.light)
from swiftui-drawer.
Confirmed, if you create a new project and add the example code to it you get an empty app, even if you adjust for the @Binding
like you mentioned. This project doesn't seem to work at all anymore.
from swiftui-drawer.
The code snipped from documentation doesn't work on Xcode 14 but following does:
Drawer(heights: .constant([100, 340])) {
Color.blue
}.edgesIgnoringSafeArea(.vertical)
from swiftui-drawer.
Related Issues (12)
- Disable Gesture Dismissal
- Cannot import: "No such Module 'Drawer'" HOT 2
- Keyboard hides drawer HOT 1
- Programmatically set the current height & disable gestures HOT 2
- Cannot define dynamic height for my drawer HOT 1
- does not sync with scrollview HOT 1
- issue with onDrag... HOT 2
- Scroll Gesture Distinction HOT 6
- Drawer offsets main view content HOT 1
- Drawer doesn't work in 0.1.0 HOT 7
- Give a property to set the most top view
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftui-drawer.