Yes, you can do this. For example, if you're using an array to populate your UITableView
, you can fill that array with the dummy data; then when you receive the real data from the server, you can replace the dummy data at the appropriate indices then call reloadData
to reload the table and update the cells with the correct data.
Can I add a temporary cell with dummy data in UITableView?
-
19-07-2023 - |
Question
Is there any way that I can add a dummy cell with data until the app fetches the real data from the server, then delete it and replace it with real data?
I'm doing this because it takes too long to go and get the data and it is supposed to be a chatroom.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow