简体   繁体   中英

Swift 3 - How I Do Page From Bottom To Top In UITableView In A Chat App?

I have messaging data when I open UITableView Controller. I want to see the last message. How can I go about doing this? Should I reload the table for each message or should I insert the cell for each message?

We developed a surplus trading software before, it also has a messaging feature. What we did is that when the user chose to refresh the whole message flow, then that is the time the whole table will be refreshed. But when there are new messages arriving from the server. We would only insert new data to the table. If there are updates for a certain message. Then we would just reload that certain row.

Because reloading the whole table will take up a lot of resources, especially when you have a big amount of data. So, don't reload the whole table as long as you don't have to.

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