反应原生重置ScrollView的高度

时间:2019-02-05 07:09:23

标签: react-native scrollview

我正在使用带有此类标签的ScrollView

<ScrollView ref={ref => this.scrollView = ref}>
<Tabs tabBarUnderlineStyle={style.tabUnderLine} onChangeTab={({ i }) => this.tabChange(i)}>

                                <Tab heading="Subscribing" textStyle={style.tabTextStyle} activeTextStyle={style.activeTextTab}>
                                    <FollowingPosts  ref={instance => { this.FollowingPostsChild = instance; }}  />
                                </Tab>
                                <Tab heading="Following" textStyle={style.tabTextStyle} activeTextStyle={style.activeTextTab}>
                                    <FollowingPosts  ref={instance => { this.FollowingPostsChild = instance; }}  />
                                </Tab>
                            </Tabs>
</ScrollView>

现在两个标签的高度相同 因此,我想在选项卡更改时重置ScrollView的高度。

0 个答案:

没有答案