AsyncDisplayKit README

The project's README from github.com/facebookarchive/AsyncDisplayKit. As one markdown file: README.md.

AsyncDisplayKit has been moved and renamed: Texture

Texture Logo

Learn more here





































AsyncDisplayKit

Apps Using Downloads

Platform Languages

Version Carthage compatible License

Installation

ASDK is available via CocoaPods or Carthage. See our Installation guide for instructions.

Performance Gains

AsyncDisplayKit's basic unit is the node. An ASDisplayNode is an abstraction over UIView, which in turn is an abstraction over CALayer. Unlike views, which can only be used on the main thread, nodes are thread-safe: you can instantiate and configure entire hierarchies of them in parallel on background threads.

To keep its user interface smooth and responsive, your app should render at 60 frames per second — the gold standard on iOS. This means the main thread has one-sixtieth of a second to push each frame. That's 16 milliseconds to execute all layout and drawing code! And because of system overhead, your code usually has less than ten milliseconds to run before it causes a frame drop.

AsyncDisplayKit lets you move image decoding, text sizing and rendering, layout, and other expensive UI operations off the main thread, to keep the main thread available to respond to user interaction.

Advanced Developer Features

As the framework has grown, many features have been added that can save developers tons of time by eliminating common boilerplate style structures common in modern iOS apps. If you've ever dealt with cell reuse bugs, tried to performantly preload data for a page or scroll style interface or even just tried to keep your app from dropping too many frames you can benefit from integrating ASDK.

Learn More

Getting Help

We use Slack for real-time debugging, community updates, and general talk about ASDK. Signup yourself or email AsyncDisplayKit(at)gmail.com to get an invite.

Contributing

We welcome any contributions. See the CONTRIBUTING file for how to get involved.

License

AsyncDisplayKit is BSD-licensed. We also provide an additional patent grant. The files in the /examples directory are licensed under a separate license as specified in each file; documentation is licensed CC-BY-4.0.

AsyncDisplayKit (facebookarchive/AsyncDisplayKit)

Searching Database…

13.3K ·GitHub
archived
这是做什么用的?AsyncDisplayKit(ASDK)是一个 iOS 框架,用于实现流畅的异步用户界面:它把开销大的 UI 工作——图片解码、文字排版和渲染、布局——从主线程挪走,让应用始终保持对用户操作的响应。
它是一个框架还是库?核心思路是什么?它是一个围绕 node(节点)构建的框架:ASDisplayNode 是对 UIView 的抽象,而 UIView 又是对 CALayer 的抽象。与视图不同,节点是线程安全的,所以你可以在后台线程上创建并配置整棵节点层级。
怎么把它加到我的应用里?通过 CocoaPods 或 Carthage —— README 里链接了一份安装指南,里面有一步一步的说明。
我今天还适合用它开新项目吗?要小心:这个仓库已经归档,README 开头就说 AsyncDisplayKit 已经被迁移并改名了,所以在采用之前,先找到它的新家。
哪类应用最能从中受益?需要预加载数据的滚动或翻页式界面、饱受 cell 复用 bug 折磨的页面,以及任何掉帧的应用——README 说,正在处理这类繁琐问题的开发者都能从集成 ASDK 中受益。
在商业应用里使用它免费吗?是的——采用 BSD 许可证,并附带额外的专利授权。/examples 目录下的文件有各自独立的许可证,文档则采用 CC-BY-4.0。
它要对抗的帧时间预算有多紧张?按 60 fps 的黄金标准,主线程每帧只有大约 16 毫秒——扣除系统开销后通常不到十毫秒。只要慢一点,应用就会掉帧,而这正是 ASDK 专门要防止的。
它自带哪些学习资料?有一份 Getting Started 指南、可以下载的示例项目,以及完整的 API 参考文档。示例代码位于仓库的 /examples 目录,该目录的许可证与采用 BSD 许可证的框架代码是分开的。
Size
128 MB
Stars
13.3K
Age
12y
Commits · 90 Days