-
Notifications
You must be signed in to change notification settings - Fork 9
指定行刷新 #3
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
Comments
你好作者,我想实现reloadRowsAtIndexPaths,指定某一个indexpath刷新,需要怎么做 |
[self.tableView reloadRowsAtIndexPaths:@[] withRowAnimation:UITableViewRowAnimationNone]; |
谢谢回复 |
网络请求完数据,此时tableView数据是空的,此时一般是要reload整个列表来渲染这些数据,因此 //通过insert...replace...等NSMutableArray的对象方法调用来修改zxDatas,此时不会触发reloadData。
[ws.tableView.zxDatas replaceObjectAtIndex:0 withObject:nil];
//手动刷新想要刷新的行
[ws.tableView reloadRowsAtIndexPaths:@[] withRowAnimation:UITableViewRowAnimationNone]; |
非常感谢,问题已解决
… 2021年1月4日 下午9:00,ZXLee ***@***.***> 写道:
网络请求完数据,此时tableView数据是空的,此时一般是要reload整个列表来渲染这些数据,因此ZXTableView在zxDatas的setter方法中自动调用了tableView的reloadData方法。
如果您是reload以后,已经显示了数据,需要再次刷新某一行,可以使用以下方式:
//通过insert...replace...等NSMutableArray的对象方法调用来修改zxDatas,此时不会触发reloadData。
[ws.tableView.zxDatas replaceObjectAtIndex:0 withObject:nil];
//手动刷新想要刷新的行
[ws.tableView reloadRowsAtIndexPaths:@[] withRowAnimation:UITableViewRowAnimationNone];
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#3 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADNI5CGEOVYDLOXTNJOI46TSYG3YRANCNFSM4VN2ZVGA>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: