Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Josscii
Created September 15, 2017 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Josscii/6ae9b9c88cefb9f6a511a5c7800414b4 to your computer and use it in GitHub Desktop.
Save Josscii/6ae9b9c88cefb9f6a511a5c7800414b4 to your computer and use it in GitHub Desktop.
iOS 分页调研

iOS 分页调研

最近在实现 iOS 中分页的时候,看了一下各大新闻 app 中的方案,初步总结如下:

今日头条

collectionView + 数据缓存的方案 + 没有 contentOffset 缓存

腾讯新闻

UIScrollView + 子视图 + 不控制视图数量,没有缓存机制

网易新闻

UIScrollView + 子视图 + 缓存机制,每个页面有自己的缓存时间,过期后会被销毁,并且会预加载视图,保证前一个,当前,后一个的存在。

UC 头条

UIScrollView + 子视图 + 只保证前一个,当前,后一个的存在,预加载缓存。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment