How do I create a modal window that is used almost everywhere on ios? It opens from the bottom, contains some content, there are 2 buttons on top: cancel and save, and the name in the center. This is the default window on iOS, on Android I think it is displayed exactly the same, but in a different design. The problem is that I just don’t know its name, so I haven’t been able to find it for several hours
This window most often opens when you click on the plus sign in the upper right corner of the page. An example is a window from the Calendar application
2
Answers
I found my answer. For navigation, I used @react-navigation/native-stack, which has a built-in way to create exactly the modals I need.
myModal opens exactly like the screenshot I attached to my post
I don’t think there is something out of the box in React Native to open a Window like shown in your image. I feel you will need to create one by yourself. If you are interested in creating a
Modal
in React Native, I would suggest you have a look at this Modal library.If you plan to create a custom Modal then I suggest you create a custom
Component
. You will make aComponent
as follows giving the parentComponent
all the liberty to change it throughprops
.Then in your parent component, you need to import this component like this:
UPDATE
Useful link: Integrate Native calendar in React Native