소스 검색

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