You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I set custom title for pullRefresh. But when I pull first time, it not work, app still show default title.
After, when I continue pull, it work, app show my custom title.
[_tableView addPullToRefreshWithActionHandler:^{
[weakTableView.pullToRefreshView setTitle:@"Kéo để cập nhật" forState:SVPullToRefreshStateAll];
[weakTableView.pullToRefreshView setTitle:@"Thả ra để cập nhật" forState:SVPullToRefreshStateTriggered];
[weakTableView.pullToRefreshView setTitle:@"Đang cập nhật" forState:SVPullToRefreshStateLoading];
//load data
}];
The text was updated successfully, but these errors were encountered:
@anhhtbk instead of setting the title in the block , try setting it outside the block and after adding the Pull To Refresh to the tableview. This will solve your problem.
```[_tableView addPullToRefreshWithActionHandler:^{
//load data
}];
[weakTableView.pullToRefreshView setTitle:@"Kéo để cập nhật" forState:SVPullToRefreshStateAll];
[weakTableView.pullToRefreshView setTitle:@"Thả ra để cập nhật" forState:SVPullToRefreshStateTriggered];
[weakTableView.pullToRefreshView setTitle:@"Đang cập nhật" forState:SVPullToRefreshStateLoading];```
It does not happen for the first time because the value for the title is set when block is called, and block would be called after first time. Try this thing it will work ;)
I set custom title for pullRefresh. But when I pull first time, it not work, app still show default title.
After, when I continue pull, it work, app show my custom title.
The text was updated successfully, but these errors were encountered: