【React Native】文件翻譯閱讀紀錄 - Components(組件) - TabBarIOS
![]() |
| Facebook Open Source React Native |
TabBarIOS
Props
barStylebarTintColoritemPositioningstyletintColortranslucentunselectedItemTintColorunselectedTintColor
Reference
Props
barStyle
標籤欄的樣式。支持的值為“default”,“black”。使用“黑色”而不是將barTintColor設置為黑色。這會生成一個標籤欄,其原生iOS風格具有更高的半透明度。
| TYPE | REQUIRED |
|---|---|
| enum('default', 'black') | No |
barTintColor
標籤欄的背景顏色
| TYPE | REQUIRED |
|---|---|
| color | No |
itemPositioning
指定標籤欄項目定位。可用值包括:
- fill - 在標籤欄的整個寬度上分配項目
- center - 可用標籤欄空間中的中心項
- auto (default) - 根據用戶界面慣用法動態分配項目。在水平緊湊的環境(例如iPhone 5)中,該值默認為填充,在水平常規的(例如iPad)中,它默認為居中。
| TYPE | REQUIRED |
|---|---|
| enum('fill', 'center', 'auto') | No |
style
| TYPE | REQUIRED |
|---|---|
| View.style | No |
tintColor
當前所選選項卡圖標的顏色
| TYPE | REQUIRED |
|---|---|
| color | No |
translucent
一個布爾值,指示標籤欄是否為半透明
| TYPE | REQUIRED |
|---|---|
| bool | No |
unselectedItemTintColor
未選中的選項卡圖標的顏色。從iOS 10開始提供。
| TYPE | REQUIRED |
|---|---|
| color | No |
unselectedTintColor
未選定選項卡上的文本顏色
| TYPE | REQUIRED |
|---|---|
| color | No |

0 意見