Is it possible to reproduce the iOS Action Sheet (formSheet, pageSheet) Modal style?
See original GitHub issueAsk your Question
I was wondering if it was possible to create the native iOS formSheet/pageSheet modal using react-native-modal
since the default options have a lot of style applied to them.
This is how it looks using the default Modal
component from react-native
:
Only problem with this is, that it’s not possible to swipe down to dismiss (god knows why)
So I’ve tried using
<Modal
presentationStyle="formSheet"
hideModalContentWhileAnimating={true}
useNativeDriver={true}
isVisible={searchFilterModalShown}
onDismiss={() => console.log('on dismiss')}>
<SearchFilterView searchFilter={state.searchFilter} />
</Modal>
But
- this give me the LogBox warning that a “Modal with ‘formSheet’ presentation style and ‘transparent’ value is not supported.”
- Doesn’t look native at all. Has weird margins, has weird static shadow, has no borders and cannot be dragged down either.
I guess the styling can be fixed using style
, but what I’m trying to do is make it dismissable by user gesture. Is this possible?
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:13
Top Results From Across the Web
Is it possible to reproduce the iOS Action Sheet (formSheet ...
I was wondering if it was possible to create the native iOS formSheet/pageSheet modal using react-native-modal since the default options have a lot...
Read more >Modal presentation in iOS - Medium
This article describes the basics of the standard iOS modality and ... The display format of a sheet; The way of controlling a...
Read more >How to present a Bottom Sheet in iOS 15 with ... - Sarunw
Set modalPresentationStyle to sheet. We have two options, .formSheet and .pageSheet . · Set the size of the sheet. .medium() is the size...
Read more >Customize and resize sheets in UIKit - WWDC21 - Videos
Discover how you can create a layered and customized sheet experience in UIKit. We'll explore how you can build a non- modal experience...
Read more >iOS 14 (SwiftUI) Sheet Modals not … | Apple Developer Forums
In any case, let me give you two examples of the very same app, one reproducing the issue and the other one without...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hope this works for you. I also like @mrousavy’s UI … nice!
you could use the modal mode provided by react navigation. No need of any modal component.
https://user-images.githubusercontent.com/64470126/138456413-e27eb077-08cb-4f2b-a4e9-7be1ef5aeec5.mov