Files
AsyncDisplayKit/_docs/astablenode.md

1.2 KiB
Executable File

title, layout, permalink, next
title layout permalink next
ASTableNode docs /docs/astablenode.html display-node.html

ASTableNode is equivalent to UIKit's UITableView.

If you've used previous versions of ASDK, you'll notice that ASTableView has been removed in favor of ASTableNode. ASTableView (an actual UITableView subclass) is still in use as an internal property of ASTableNode but should no longer be used by itself.

That being said, you can still grab a reference to the underlying ASTableView if necessary by accessing the .view property of an ASTableNode.

ASTableNode can be used in place of any UITableView. The only requirements are that you replace your

-cellForRowAtIndexPath:

method with a

-nodeForRowAtIndexPath:

or

-nodeBlockForRowAtIndexPath:

Otherwise, a table node has mostly the same delegate and dataSource methods that a table view would.

An important thing to notice is that ASTableNode does not provide a method called:

-tableNode:HeightForRowAtIndexPath:

This is because in ASDK, nodes are responsible for determining their height themselves which means you no longer have to write code to determine this detail at the view controller level.