ソースを参照

Add keepStyleAcrossPush to documentation

Guy Carmeli 7 年 前
コミット
e1b65cfc1a
共有1 個のファイルを変更した13 個の追加0 個の削除を含む
  1. 13
    0
      docs/styling-the-navigator.md

+ 13
- 0
docs/styling-the-navigator.md ファイルの表示

@@ -20,6 +20,19 @@ export default class StyledScreen extends Component {
20 20
   }
21 21
 ```
22 22
 
23
+## Disabling persistent styling properties on iOS
24
+By design, most style properties on iOS are carried on to pushed screens. For example, If the navigation stack contains a single screen with `navBarButtonColor: 'blue'`; any screen pushed to this stack will have a blue `navBar` without needing to declare that property. This results in unpredictable and hard to determine style mechanism, therefore it wasn't implemented on Android.
25
+To disable this behavior on iOS, add `keepStyleAcrossPush: false` to `appStyle`:
26
+
27
+```js
28
+Navigation.startTabBasedApp({
29
+  ...
30
+  appStyle: {
31
+    keepStyleAcrossPush: false
32
+  }
33
+});
34
+```
35
+
23 36
 ## Setting styles dynamically
24 37
 Use the `setStyle` method to change a screen's style dynamically.
25 38