我的本機iOS有TabBarController作爲根視圖控制器。我有主屏幕上的PageViewController(這是一個容器視圖),其中的觀點1支持陣營天然ListView是否可以有子視圖
目標:顯示拉網查看,同時允許用戶切換標籤
我有嘗試使用模式& Alert API進行顯示。彈出窗口可以很好地工作,但兩者都掩蓋整個屏幕&恢復交互的唯一方法是按下Alert中的CANCEL按鈕。掩蔽使切換標籤不可能。
由於我不能刪除模態或alertView的蒙版,我反而試圖渲染一個視圖,它是ListView的子視圖。 這裏是我的渲染()函數
return (
<View style={{flex:1}}>
<ListView
onEndReachedThreshold={-5}
renderFooter={this._renderFooter}
onEndReached={this.onEndReached}
contentContainerStyle={styles.list}
dataSource={this.state.dataSource}
renderRow = {(rowData) => Row(rowData)}>
<View style={styles.popUpStyle}>
</View>
</ListView>
</View>
)
}
我的樣式表如下所示
list: {
justifyContent: 'center',
alignItems : 'center',
flexDirection: 'row',
flexWrap: 'wrap',
opacity : 1
},
popUpStyle : {
width: widthOfScreen - 50,
height: heightOfScreen/3,
backgroundColor:'#000000',
borderRadius: 5,
shadowColor:'#000000',
shadowRadius:5,
shadowOpacity:0.8
}
我期待一個視圖出現在屏幕的基礎上我加了,但可惜沒有樣式的中心,ListView的沒什麼。 listView是否可以有一個子View?更重要的是,我可以在沒有面具的情況下製作一個彈出視圖嗎?
爲什麼標記爲Android? –
@ChantellOsejo標記的原因是Force對React-Native和一些Android工程師可能已經轉向黑暗一方。 – MrDank
所以基本上你想要一個視圖在屏幕中間彈出,同時允許用戶仍然使用標籤導航而不必關閉視圖?如果沒有,對不起,但你能解釋一下嗎? –