简体   繁体   中英

Wait for user to finish interacting with UITableView

I would like to implement what Gmail does in its app. That is, it fetches the emails in the background on a pull-to-refresh and when the data is available, it will update the UITableView. But if the user is interacting with the UITableView just before updating the UITableView, the app waits until the time the user releases his touch and then updates it. How can I achieve this on iOS and Android?

There are multiple tutorials on the internet for achieving this. Basically you have to use a UIRefreshControl . Check this answer or this tutorial.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM