Swiftgram/AsyncDisplayKit/ASNodeController.h
Hannah Troisi 7f7f28385d [ASNodeController] First implementation of node controller class (#2945)
* [ASNodeController] initial commit for node controller class

* create <ASInterfaceState> protocol, -[ASDisplayNode interfaceDelegate], and use these to forward to ASNodeController

* rename ASInterfaceStateDelegate, fix setting in it ASNodeController.mm
2017-01-31 14:27:02 -08:00

32 lines
1.0 KiB
Objective-C

//
// ASNodeController.h
// AsyncDisplayKit
//
// Created by Hannah Troisi for Scott Goodson on 1/27/17.
// Copyright © 2017 Facebook. All rights reserved.
//
#import <AsyncDisplayKit/ASDisplayNode.h>
#import <AsyncDisplayKit/ASDisplayNode+Subclasses.h> // for ASInterfaceState protocol
@interface ASNodeController<__covariant DisplayNodeType : ASDisplayNode *> : NSObject <ASInterfaceStateDelegate>
@property (nonatomic, strong) DisplayNodeType node;
- (void)loadNode;
// for descriptions see <ASInterfaceState> definition
- (void)didEnterVisibleState ASDISPLAYNODE_REQUIRES_SUPER;
- (void)didExitVisibleState ASDISPLAYNODE_REQUIRES_SUPER;
- (void)didEnterDisplayState ASDISPLAYNODE_REQUIRES_SUPER;
- (void)didExitDisplayState ASDISPLAYNODE_REQUIRES_SUPER;
- (void)didEnterPreloadState ASDISPLAYNODE_REQUIRES_SUPER;
- (void)didExitPreloadState ASDISPLAYNODE_REQUIRES_SUPER;
- (void)interfaceStateDidChange:(ASInterfaceState)newState
fromState:(ASInterfaceState)oldState ASDISPLAYNODE_REQUIRES_SUPER;
@end