React Native 固定页脚
问题描述:
我尝试创建看起来像现有 Web 应用程序的 React Native 应用程序.我在窗口底部有一个固定的页脚.有谁知道如何通过 react native 实现这一点?
I try to create react native app that looks like existing web app. I have a fixed footer at bottom of window. Do anyone have idea how this can be achieved with react native?
在现有应用中很简单:
.footer {
position: fixed;
bottom: 0;
}
答
在我的脑海里,你可以用 ScrollView.您的顶级容器可以是一个 flex 容器,其中顶部有一个 ScrollView,底部有您的页脚.然后在 ScrollView 内像往常一样放置应用程序的其余部分.
Off the top of my head you could do this with a ScrollView. Your top-level container could be a flex container, inside that have a ScrollView at the top and your footer at the bottom. Then inside the ScrollView just put the rest of your app as normal.