IOS 开发中reloadData 一般在什么时候使用?
认证0级讲师
When the data is updated, refresh the page.
UITableView is used when refreshing the page.
After obtaining new data, refresh the interface to display
Called when the data source is updated.
When requesting data, when data changes, when pulling up and down to refresh...whenever you want to refresh, it depends on the specific situation
Generally, the first time you request it, the data needs to be refreshedreloadData,第二次就是再次下拉刷新或者上拉加载时候刷新reloadData,或者在点击cell中一个按钮或者前天元素导致界面要变化的,一般刷新一个cell就行,但是用reloadData.
reloadData
When the data is updated, refresh the page.
UITableView is used when refreshing the page.
After obtaining new data, refresh the interface to display
Called when the data source is updated.
When requesting data, when data changes, when pulling up and down to refresh...whenever you want to refresh, it depends on the specific situation
Generally, the first time you request it, the data needs to be refreshed
reloadData
,第二次就是再次下拉刷新或者上拉加载时候刷新reloadData
,或者在点击cell中一个按钮或者前天元素导致界面要变化的,一般刷新一个cell就行,但是用reloadData
.