Sfoglia il codice sorgente

add setTabButton instructions (#1195)

Gevorg Gasparyan 7 anni fa
parent
commit
061cb5b60a
1 ha cambiato i file con 11 aggiunte e 0 eliminazioni
  1. 11
    0
      docs/screen-api.md

+ 11
- 0
docs/screen-api.md Vedi File

@@ -203,6 +203,17 @@ this.props.navigator.setTabBadge({
203 203
   badge: 17 // badge value, null to remove badge
204 204
 });
205 205
 ```
206
+## setTabButton(params = {})
207
+
208
+Change the tab icon on a bottom tab.
209
+
210
+```js
211
+this.props.navigator.setTabButton({
212
+  tabIndex: 0, // (optional) if missing, the badge will be added to this screen's tab
213
+  icon: require('../img/one.png'), // local image asset for the tab icon unselected state (optional)
214
+  selectedIcon: require('../img/one_selected.png'), // local image asset for the tab icon selected state (optional, iOS only)
215
+});
216
+```
206 217
 
207 218
 ## switchToTab(params = {})
208 219