diff --git a/_docs/containers-ascollectionnode.md b/_docs/containers-ascollectionnode.md index a08c5e71..72671ae7 100755 --- a/_docs/containers-ascollectionnode.md +++ b/_docs/containers-ascollectionnode.md @@ -33,17 +33,17 @@ As noted in the previous section ##Replace UICollectionViewController with ASViewController## -AsyncDisplayKit does not offer an equivalent to UICollectionViewController. Instead, use an ASViewController initialized with an ASCollectionNode. +AsyncDisplayKit does not offer an equivalent to UICollectionViewController. Instead, you can use the flexibility of ASViewController to recreate any type of UIViewController. -Consider, the ASViewController subclass - LocationCollectionNodeController - from the ASDKgram sample app that uses a collection node as its managed node. +Consider, the following ASViewController subclass. -An `ASCollectionNode` is assigned to be managed by an `ASViewController` in its `initWithNode:` designated initializer method. +An `ASCollectionNode` is assigned to be managed by an `ASViewController` in its `initWithNode:` designated initializer method, thus making it a sort of ASCollectionNodeController.
SwiftObjective-C
-- (instancetype)initWithCoordinates:(CLLocationCoordinate2D)coordinates
+- (instancetype)init
 {
   _flowLayout     = [[UICollectionViewFlowLayout alloc] init];
   _collectionNode = [[ASCollectionNode alloc] initWithCollectionViewLayout:_flowLayout];
@@ -59,7 +59,7 @@ An `ASCollectionNode` is assigned to be managed by an `ASViewController` in its
 
+This works just as well with any node such as an ASTableNode, ASPagerNode, etc. + ##Accessing the ASCollectionView## If you've used previous versions of ASDK, you'll notice that `ASCollectionView` has been removed in favor of `ASCollectionNode`. @@ -79,7 +81,7 @@ If you've used previous versions of ASDK, you'll notice that `ASCollectionView` `ASCollectionView` (an actual UICollectionView subclass) is still used as an internal property of `ASCollectionNode`. While it should not be created directly, it can still be used directly by accessing the .view property of an `ASCollectionNode`. -**Do not forget that anything that accesses a view using AsyncDisplayKit's node containers or nodes should be done in viewDidLoad or didLoad, respectively.** +
Do not forget that anything that accesses a view using AsyncDisplayKit's node containers or nodes should be done in viewDidLoad or didLoad, respectively.
The LocationCollectionNodeController above accesses the ASCollectionView directly in viewDidLoad