Skip to content

Commit 4f78a79

Browse files
authored
feat(ios): backgroundColor for RefreshControl (#14016)
* feat(ios): backgroundColor for RefreshControl * fix version number
1 parent a0a3aea commit 4f78a79

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

apidoc/Titanium/UI/RefreshControl.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ properties:
5555
platforms: [android, iphone, ipad, macos]
5656
since: { android: "6.2.0", iphone: "3.2.0", ipad: "3.2.0" }
5757

58+
- name: backgroundColor
59+
summary: The background color for the refresh control, as a color name or hex triplet.
60+
description: |
61+
For information about color values, see the "Colors" section of <Titanium.UI>.
62+
type: [String, Titanium.UI.Color]
63+
platforms: [iphone, ipad, macos]
64+
since: { iphone: "12.4.0", ipad: "12.4.0", macos: "12.4.0" }
65+
5866
events:
5967
- name: refreshstart
6068
summary: |

iphone/Classes/TiUIRefreshControlProxy.m

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ - (void)setTintColor:(id)value
7878
NO);
7979
}
8080

81+
- (void)setBackgroundColor:(id)value
82+
{
83+
[self replaceValue:value forKey:@"backgroundColor" notification:NO];
84+
85+
TiThreadPerformOnMainThread(
86+
^{
87+
[[self control] setBackgroundColor:[[TiUtils colorValue:value] color]];
88+
},
89+
NO);
90+
}
91+
8192
- (void)beginRefreshing:(id)unused
8293
{
8394
TiThreadPerformOnMainThread(

0 commit comments

Comments
 (0)