Home>

I swift hit RESTApi to get data in json format and make an application that displays images and titles in table view in list format. I want to reload the tableView only when there is an update to the information acquired in step 3. What is the method?

I can't come up with a method at all.

  • Answer # 1

    If you want to optimize the update of TableView by calculating the data difference (&want to automatically perform the difference animation), several libraries have been enriched recently.

    https://github.com/ra1028/DifferenceKit
    https://github.com/RxSwiftCommunity/RxDataSources
    Etc ... (Comparison with other libraries is summarized in DiffrenceKit README)

    Please refer to this article for reference.