[英]react native- there is way to change the arrow navigation icon to menu icon?
[英]React Navigation Icon in React Native
我使用react-native-navigation在我的項目中創建導航,我需要放置圖像而不是圖標,這是我的代碼
const startTabs = () => { Navigation.startTabBasedApp({ tabs: [ { screen: "awesome-places.Product", label: "first Icon", title: "first Icon", icon: require("../../../images/006-coffee-cup.png") }, { screen: "awesome-places.Bag", label: "Icon", title: "Icon" } ] }); };
並且我需要保留圖像的顏色,那么我該怎么做呢?
我認為默認情況下,每個選中的圖標的背景色也會更改, “更改所有非透明像素的顏色”
嘗試添加具有相同圖像的selectedIcon :
const startTabs = () => {
Navigation.startTabBasedApp({
tabs: [
{
screen: "awesome-places.Product",
label: "first Icon",
title: "first Icon",
icon: require("../../../images/006-coffee-cup.png")
selectedIcon: require("../../../images/006-coffee-cup.png")
},
{
screen: "awesome-places.Bag",
label: "Icon",
title: "Icon"
}
]
});
};
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.