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

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Apr 4, 2024

Adds the ability to change the backgroundColor of the refresh box:

Test

const win = Ti.UI.createWindow();
let counter = 0;
function genData() {
    const data = [];
    for (let i = 1; i <= 3; i++) {
        data.push({ properties:{ title: `ROW ${counter + i}` } });
    }
    counter += 3;
    return data;
}
const section = Ti.UI.createListSection();
section.items = genData();
const control = Ti.UI.createRefreshControl({
    tintColor: 'red',
    backgroundColor: "green"
});
const listView = Ti.UI.createListView({
    sections: [section],
    refreshControl: control
});
control.addEventListener('refreshstart', () => {
    Ti.API.info('refreshstart');
    setTimeout(() => {
        Ti.API.debug('Timeout');
        section.appendItems(genData());
        control.endRefreshing();
    }, 2000);
});
win.add(listView);
win.open();

screenshot

@zo0m
Copy link

zo0m commented Apr 4, 2024

Thank you

Copy link
Collaborator

@hansemannn hansemannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment to check

apidoc/Titanium/UI/RefreshControl.yml Outdated Show resolved Hide resolved
@hansemannn hansemannn merged commit 4f78a79 into master May 4, 2024
7 checks passed
@hansemannn hansemannn deleted the iosRefreshBgColor branch May 4, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants