Skip to content

Commit

Permalink
feat(ios): backgroundColor for RefreshControl
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Apr 4, 2024
1 parent 76dc1db commit e9350db
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
Original file line number Diff line number Diff line change
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" }

events:
- name: refreshstart
summary: |
Expand Down
11 changes: 11 additions & 0 deletions iphone/Classes/TiUIRefreshControlProxy.m
Original file line number Diff line number Diff line change
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 e9350db

Please sign in to comment.