Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ios): backgroundColor for RefreshControl #14016

Merged
merged 2 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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", macos: "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
Loading