What is the proper method/accepted standard for loading data asynchronously into table view cells?

前端 未结 4 2099
梦毁少年i
梦毁少年i 2021-02-06 03:04

Many apps such as Tweetbot, Twitterrific, Alien Blue, etc. that display images from an API seem to load them in an asynchronous manner. It seems the initial viewable images are

4条回答
  •  清歌不尽
    2021-02-06 03:27

    The Apple documentation has some sample code demonstrating ways to lazily load images into table view cells. It takes care of cancelling downloads for images that are scrolled out of sight and not starting image downloads at all until the user stops scrolling.

提交回复
热议问题