Files
AsyncDisplayKit/_docs/containers-overview.md
Hannah Trosi fc88b8ccac website refactoring
clean up optimization docs
rearrange sections in nav bar
add layout api sizing Q to FAQ
add corner rounding to Optimizations + check back soon tags for methods to be released in 2.0
add layoutSpecs
Containers overview -> node containers
Node overview -> node subclasses
remove ASTextCellNode
2016-07-10 22:52:58 -07:00

1.4 KiB

title, layout, permalink, prevPage, nextPage
title layout permalink prevPage nextPage
Node Containers docs /docs/containers-overview.html layout-engine.html containers-asviewcontroller.html

Use Nodes in Node Containers

It is highly recommended that you use AsyncDisplayKit's nodes within a node container. AsyncDisplayKit offers the following node containers

  • ASViewController in place of UIKit's UIViewController
  • ASCollectionNode in place of UIKit's UICollectionView
  • ASPagerNode in place of UIKit's UIPageViewController
  • ASTableNode in place of UIKit's UITableView

Example code and specific sample projects are highlighted in the documentation for each node container.

For a detailed description on porting an existing UIKit app to AsyncDisplayKit, read the porting guide.

What do I Gain by Using a Node Container?

A node container automatically manages the intelligent preloading of its nodes. This means that all of the node's layout measurement, data fetching, decoding and rendering will be done asynchronously. Among other conveniences, this is why it is reccomended to use nodes within a container node.

Note that while it is possible to use nodes directly (without an AsyncDisplayKit node container), unless you add additional calls, they will only start displaying once they come onscreen (as UIKit does). This can lead to performance degredation and flashing of content.