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

emptyview显示时机不对的问题 #73

Open
CodeForYang opened this issue Jul 23, 2021 · 0 comments
Open

emptyview显示时机不对的问题 #73

CodeForYang opened this issue Jul 23, 2021 · 0 comments

Comments

@CodeForYang
Copy link

在自动显示emptyView的情况下,
如果在ly_startLoading 和 发送请求之前触发了[tableview reloadData],
比如layoutSubviews ->[tableview reloadData]
会出现 ly_startLoading设置被覆盖,emptyView会显示出来

代码类似这样

//网络请求时调用
[self.tableView ly_startLoading];

[self.tableView reloadData];

//这里面是网络请求
[super loadDataWithFinish:^{
    
    //回调到这里,网络请求结束,tableview已经reloadData
    
    [self.tableView ly_endLoading];//必须保证在reloadData后调用
}];
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

No branches or pull requests

1 participant