Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

When I have a UITableView as part of the visible view controller, how can I reload it so that the data I am looking at changes to the new data. Just calling reload doesn't seem to refresh the data until I scroll it.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
330 views
Welcome To Ask or Share your Answers For Others

1 Answer

Calling the reloadData method refreshes the data as soon as the method is called. It does not wait for the table to be scrolled. Make sure the data source (array or dictionary or wherever you've saved the values) is changed before you call reloadData.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...