Swiftgram/submodules/AsyncDisplayKit/docs/_docs/containers-overview.md
Peter 9bc996374f Add 'submodules/AsyncDisplayKit/' from commit '02bedc12816e251ad71777f9d2578329b6d2bef6'
git-subtree-dir: submodules/AsyncDisplayKit
git-subtree-mainline: d06f423e0ed3df1fed9bd10d79ee312a9179b632
git-subtree-split: 02bedc12816e251ad71777f9d2578329b6d2bef6
2019-06-11 18:42:43 +01:00

2.4 KiB
Executable File

title layout permalink prevPage nextPage
Node Containers docs /docs/containers-overview.html intelligent-preloading.html node-overview.html

Use Nodes in Node Containers

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

Texture Node Container UIKit Equivalent
ASCollectionNode in place of UIKit's UICollectionView
ASPagerNode in place of UIKit's UIPageViewController
ASTableNode in place of UIKit's UITableView
ASViewController in place of UIKit's UIViewController
ASNavigationController in place of UIKit's UINavigationController. Implements the ASVisibility protocol.
ASTabBarController in place of UIKit's UITabBarController. Implements the ASVisibility protocol.

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

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 recommended to use nodes within a container node.

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