Skip to content

Commit

Permalink
feat(ios): backgroundColor for RefreshControl (#14016)
Browse files Browse the repository at this point in the history
* feat(ios): backgroundColor for RefreshControl

* fix version number
  • Loading branch information
m1ga committed May 4, 2024
1 parent a0a3aea commit 4f78a79
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apidoc/Titanium/UI/RefreshControl.yml
Expand Up @@ -55,6 +55,14 @@ properties:
platforms: [android, iphone, ipad, macos]
since: { android: "6.2.0", iphone: "3.2.0", ipad: "3.2.0" }

- name: backgroundColor
summary: The background color for the refresh control, as a color name or hex triplet.
description: |
For information about color values, see the "Colors" section of <Titanium.UI>.
type: [String, Titanium.UI.Color]
platforms: [iphone, ipad, macos]
since: { iphone: "12.4.0", ipad: "12.4.0", macos: "12.4.0" }

events:
- name: refreshstart
summary: |
Expand Down
11 changes: 11 additions & 0 deletions iphone/Classes/TiUIRefreshControlProxy.m
Expand Up @@ -78,6 +78,17 @@ - (void)setTintColor:(id)value
NO);
}

- (void)setBackgroundColor:(id)value
{
[self replaceValue:value forKey:@"backgroundColor" notification:NO];

TiThreadPerformOnMainThread(
^{
[[self control] setBackgroundColor:[[TiUtils colorValue:value] color]];
},
NO);
}

- (void)beginRefreshing:(id)unused
{
TiThreadPerformOnMainThread(
Expand Down

0 comments on commit 4f78a79

Please sign in to comment.