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, позволяющий делать плавные асинхронные интерфейсы: он выносит тяжёлую работу по отрисовке интерфейса — декодирование картинок, измерение и рендеринг текста, раскладку — с главного потока, чтобы приложение не переставало реагировать на действия пользователя.
Это фреймворк или библиотека, и в чём основная идея?Это фреймворк, построенный вокруг concept ноды (node): ASDisplayNode — это абстракция над UIView, которая, в свою очередь, абстрагирует CALayer. В отличие от view, ноды потокобезопасны, поэтому целые иерархии интерфейса можно создавать и настраивать в фоновых потоках.
Как добавить его в своё приложение?Через CocoaPods или Carthage — в README есть ссылка на руководство по установке (Installation guide) с пошаговыми инструкциями.
Стоит ли начинать с ним новый проект сегодня?Осторожно: репозиторий заархивирован, и README сразу сообщает, что AsyncDisplayKit перенесён и переименован, так что прежде чем его внедрять, стоит выяснить, где он теперь живёт.
Каким приложениям он принесёт больше всего пользы?Интерфейсам со скроллом или перелистыванием страниц с предзагрузкой данных, экранам, где мучаются с багами переиспользования ячеек, и вообще любому приложению, в котором проседает частота кадров — в 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