diff --git a/_docs/containers-overview.md b/_docs/containers-overview.md index 22ded4bf..82a65e9c 100644 --- a/_docs/containers-overview.md +++ b/_docs/containers-overview.md @@ -7,16 +7,35 @@ nextPage: node-overview.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 +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` - + + + + + + + + + + + + + + + + + + + + + +
ASDK Node ContainerUIKit Equivalent
ASViewControllerin place of UIKit's UIViewController
ASCollectionNodein place of UIKit's UICollectionView
ASPagerNodein place of UIKit's UIPageViewController
ASTableNodein 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? diff --git a/_docs/node-overview.md b/_docs/node-overview.md index 02724436..7c3134a0 100755 --- a/_docs/node-overview.md +++ b/_docs/node-overview.md @@ -6,36 +6,63 @@ prevPage: containers-overview.html nextPage: 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. +AsyncDisplayKit offers the following nodes. -The most common nodes include: +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. -- `ASDisplayNode` in place of UIKit's `UIView`. ASDisplayNode is the root AsyncDisplayKit node, from which all other nodes inherit. - -- `ASCellNode` (and the lighter-weight `ASTextCellNode`) in place of UIKit's `UITableViewCell` and `UICollectionViewCell`. ASCellNodes are used in `ASTableNode`, `ASCollectionNode` and `ASPagerNode`. - -- `ASScrollNode` in place of UIKit's `UIScrollView`. This node is useful for creating a customized scrollable region that contains other nodes. - -- `ASEditableTextNode` in place of UIKit's `UITextView` - -- `ASControlNode` in place of UIKit's `UIControl` - -- `ASTextNode` in place of UIKit's `UILabel` - -- `ASMapNode` in place of UIKit's `MKMapView` - -- `ASButtonNode` in place of UIKit's `UIButton` - -- `ASImageNode` in place of UIKit's `UIImageView` - -- `ASVideoNode` in place of UIKit's `AVPlayerLayer` - -- `ASVideoNodePlayer` in place of UIKit's `UIMoviePlayer` - -- `ASNetworkImageNode` - -- `ASMultiplexImageNode` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ASDK NodeUIKit Equivalent
ASDisplayNodein place of UIKit's UIView
+ The root AsyncDisplayKit node, from which all other nodes inherit.
ASCellNodein place of UIKit's UITableViewCell & UICollectionViewCell
+ ASCellNodes are used in ASTableNode, ASCollectionNode and ASPagerNode.
ASScrollNodein place of UIKit's UIScrollView +

This node is useful for creating a customized scrollable region that contains other nodes.

ASEditableTextNode
+ ASTextNode
in place of UIKit's UITextView
+ in place of UIKit's UILabel
ASImageNode
+ ASNetworkImageNode
+ ASMultiplexImageNode
in place of UIKit's UIImage
ASVideoNode
+ ASVideoPlayerNode
in place of UIKit's AVPlayerLayer
+ in place of UIKit's UIMoviePlayer
ASControlNodein place of UIKit's UIControl
ASButtonNodein place of UIKit's UIButton
ASMapNodein place of UIKit's MKMapView
+
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. @@ -43,17 +70,11 @@ The -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. +The nodes highlighted in blue 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. diff --git a/static/images/node-hierarchy.png b/static/images/node-hierarchy.png index a5b08542..8f0c021b 100644 Binary files a/static/images/node-hierarchy.png and b/static/images/node-hierarchy.png differ