|
56 | 56 | * [Usage in Svelte](#usage-in-svelte)
|
57 | 57 | * [Examples](#examples-2)
|
58 | 58 | * [Usage in Vue](#usage-in-vue)
|
59 |
| - * [Examples](#examples-3) |
| 59 | + * [Examples](#examples-3) |
| 60 | +* [Custom Transformer](#custom-transformer) |
60 | 61 |
|
61 | 62 |
|
62 | 63 | [](#installation)
|
@@ -96,6 +97,7 @@ Run the following command from the root of your project:
|
96 | 97 | | autoPlay | `boolean` |
|
97 | 98 | | disableSwipe | `boolean` |
|
98 | 99 | | showIndicator | `boolean` |
|
| 100 | +| transformers | `string` | |
99 | 101 |
|
100 | 102 |
|
101 | 103 | ```
|
@@ -198,6 +200,28 @@ Vue.use(Pager);
|
198 | 200 | - A simple pager example using static content.
|
199 | 201 | - [Basic Pager](demo-snippets/vue/BasicPager.vue)
|
200 | 202 | - A simple pager example using dynamic content.
|
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | +[](#custom-transformer) |
| 207 | + |
| 208 | + |
| 209 | +[](#custom-transformer) |
| 210 | + |
| 211 | +## Custom Transformer |
| 212 | + |
| 213 | +You can define custom transformer for iOS/Android |
| 214 | + |
| 215 | +You can follow the `Scale` example for [iOS](src/ui-pager/transformers/Scale.ios.ts) and [Android](src/ui-pager/transformers/Scale.android.ts) to create your custom transformer. |
| 216 | + |
| 217 | +Then you can register your transformer on app start with (this example registered the included but not registered Scale transformer): |
| 218 | +```ts |
| 219 | +import { Pager } from '@nativescript-community/ui-pager'; |
| 220 | +import transformer from '@nativescript-community/ui-pager/transformers/Scale'; |
| 221 | + |
| 222 | +Pager.registerTransformer('scale', transformer) |
| 223 | +``` |
| 224 | +Then you can use that transformer with the `transformers` property of `Pager` |
201 | 225 | </details><details>
|
202 | 226 | <summary><b>ui-pager-indicator</b></summary>
|
203 | 227 | <!-- ⚠️ This README has been generated from the file(s) "blueprint.md" ⚠️-->
|
|
0 commit comments