We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c456a6b commit 91c42bcCopy full SHA for 91c42bc
src/switch/index.ios.ts
@@ -1,4 +1,14 @@
1
-import { SwitchBase } from './index-common';
+import { SwitchBase, onBackgroundColorProperty } from './index-common';
2
3
// TODO: for now iOS uses system switch
4
-export class Switch extends SwitchBase {}
+export class Switch extends SwitchBase {
5
+
6
+ [onBackgroundColorProperty.setNative](value) {
7
+ if (value) {
8
+ this.nativeViewProtected.onTintColor = value instanceof Color ? value.ios : value;
9
+ }
10
+ else {
11
+ this.nativeViewProtected.onTintColor = null;
12
13
14
+}
0 commit comments