문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top