Files
AsyncDisplayKit/_docs/node-overview.md
2016-07-17 20:29:36 -07:00

3.0 KiB
Executable File

title, layout, permalink, prevPage, nextPage
title layout permalink prevPage nextPage
Node Subclasses docs /docs/node-overview.html containers-overview.html subclassing.html

AsyncDisplayKit offers the following nodes. A key advantage of using nodes over UIKit components is that all nodes preform layout and display off of the main thread, so that the main thread is available to immediately respond to user interaction events.

The most common nodes include:

Despite having rough equivalencies to UIKit components, in general, AsyncDisplayKit nodes offer more advanced features and conveniences. For example, an ASNetworkImageNode does automatic loading and cache management, and even supports progressive jpeg and animated gifs.

The AsyncDisplayKitOverview example app gives basic implementations of each of the nodes listed above.

Node Inheritance Hierarchy

All AsyncDisplayKit nodes inherit from ASDisplayNode.

Updates to the framework (not reflected in the chart below):

  • `ASVideoNode` now inherits from `ASNetworkImageNode`.
  • `ASScrollNode` is now available. It inherits from `ASDisplayNode`.
  • `ASCellNode` used by `ASTableNode`, `ASCollectionNode` and `ASPagerNode` inherits from `ASDisplayNode`.
node inheritance flowchart

The blue and green colored nodes are synchronous wrappers of UIKit elements. For example, ASScrollNode wraps a UIScrollView and ASCollectionNode wraps a UICollectionView. An ASMapNode in liveMapMode is a synchronous wrapper of UIMapView.