--- title: ASDKViewController layout: docs permalink: /docs/containers-asdkviewcontroller.html prevPage: asrunloopqueue.html nextPage: containers-asnodecontroller.html --- `ASDKViewController` is a subclass of `UIViewController` that adds several useful features for hosting `ASDisplayNode` hierarchies. An `ASDKViewController` can be used in place of any `UIViewController` - including within a `UINavigationController`, `UITabBarController` and `UISplitViewController` or as a modal view controller. Benefits of using an `ASDKViewController`:
ASDKViewController that goes off screen will automatically reduce the size of the fetch data and display ranges of any of its children. This is key for memory management in large applications. ASVisibility Feature. When used in an ASDKNavigationController or ASTabBarController, these classes know the exact number of user taps it would take to make the view controller visible.
- (instancetype)init
{
_tableNode = [[ASTableNode alloc] initWithStyle:UITableViewStylePlain];
self = [super initWithNode:_tableNode];
if (self) {
_tableNode.dataSource = self;
_tableNode.delegate = self;
}
return self;
}
ASDKViewController. That is to say, even if you don't use ASDKViewController's designated initializer -initWithNode:, and only use the ASDKViewController in the manner of a traditional UIViewController, this will give you the additional node support if you choose to adopt it in different areas your application.