How to reproduce iOS 11 maps bottom sheet with React Native

久未见 提交于 2019-12-07 18:50:59

问题


Can anyone tell me how I can mimic the bottom sheet in the new maps app in iOS 11?

In android you can use a "BottomSheet", which mimics this behaviour, but I could not find anything like that for iOS.

Is that a simple scroll view with a content inset? So that the search bar is at the bottom?

I am fairly new to iOS programming so if someone could help me creating this layout that would be highly appreciated.

This is what I mean by "bottom sheet":


回答1:


I see this is old an question but for anyone struggling with this issue. you can use this module https://github.com/wix/react-native-interactable. Here is demo

https://github.com/wix/react-native-interactable/blob/master/playground/src/real-life-examples/MapPanel.js




回答2:


It´s not called anything special, but some refer to it as "Card". Here is a great tutorial of how to implement the bottom card as Apple Maps.



来源:https://stackoverflow.com/questions/48808157/how-to-reproduce-ios-11-maps-bottom-sheet-with-react-native

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!