Comments (3)
I think the problem might be due to scroll views - my sheet is embedded in one. However, I have found an alternative that does work at https://gist.github.com/Amzd/9ec1ee39dca840420ce35505ef360632
from partialsheet.
Nope, itβs working normally. But maybe you need to provide us with some code so you can get help.
from partialsheet.
Here is some code and some screenshots. I thought that .partialSheet was intended to be a drop in - that's what the readMe suggests.
Shot 1 shows the sheet that is already working. Shot 4 shows the navBar with the button used to activate it (the wand icon). Shot 2 shows the navBar with .partialSheet. Shot 3 shows it after making the view the first responder - the button has vanished, so you can't display the sheet.
Here is the code for the button using sheet.
Button(action: ({
if self.textView.isFirstResponder {
self.$fontSize.wrappedValue = Int(self.styleModel.getStyleChanges().fontSize)
self.showModal.toggle()
}
else {
self.showAlert.toggle()
}
})) {
Image(systemName: "wand.and.stars")
.foregroundColor(Color("WriteNowColor"))
.imageScale(.large)
}.padding()
.sheet(isPresented: $showModal) {
StyleEditor(styleModel: self.styleModel,
allFonts: self.allFonts,
textView: self.$textView,
fontSize: self.$fontSize,
version: self.version)
}.alert(isPresented: self.$showAlert, content: { self.alert })
The code using partialSheet is the same with .sheet(isPresented: $showModal) changed to .partialSheet(presented: $showModal)
shot 1.pdf
shot 2.pdf
shot 3.pdf
shot 4.pdf
from partialsheet.
Related Issues (20)
- Scroll View Extra Bottom Spacing
- [bug maybe] partialsheet will not shown in fullScreenCover page HOT 1
- Wrong safeArea spacing with .sheet
- The sheet disappears when the view is refreshed. HOT 1
- Binding for presenting partialSheet is not updated correctly when tapping fast to dismiss the sheet. HOT 3
- Keyboard doesn't work with dynamic height HOT 3
- Bound preference PresenterPreferenceKey tried to update multiple times per frame. HOT 2
- PartialSheet disappears automatically after Alert is presented
- PartialSheet 3: PSButton action is never called in ListExample
- PartialSheet Crash when using multiple horizontal scroll views HOT 2
- Partial Sheet over tab bar
- The `DragGesture.onEnded(_:)` not be called up. HOT 1
- PartialSheet auto close when openURL in sheet content with `@Environment(\.scenePhase)`
- Could not find module 'PartialSheet' for target 'x86_64-apple-ios-simulator'; found: arm64-apple-ios-simulator HOT 1
- Can't scroll with WKWebView inside the PartialSheet
- TabView over the PartialSheet
- Partial sheet on top of .sheet() gets cut off HOT 1
- How to prevent PartialSheet from closing when clicking on the background or dragging down? HOT 1
- onDismiss in version 3+ HOT 1
- Crash on tap to show the Partial sheet HOT 2
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 partialsheet.