ASDKViewController Class Reference
Conforms to | * : ASDisplayNode DisplayNodeType __covariant |
---|---|
Declared in | ASDKViewController.h |
– initWithNode:
ASDKViewController Designated initializer.
- (instancetype)initWithNode:(DisplayNodeType)node
Parameters
node |
An ASDisplayNode which will provide the root view (self.view) |
---|
Return Value
An ASDKViewController instance whose root view will be backed by the provided ASDisplayNode.
Discussion
ASDKViewController allows you to have a completely node backed heirarchy. It automatically handles @c ASVisibilityDepth, automatic range mode and propogating @c ASDisplayTraits to contained nodes.
See Also
Declared In
ASDKViewController.h
node
node Returns the ASDisplayNode which provides the backing view to the view controller.
@property (nonatomic, strong, readonly) DisplayNodeType node
Return Value
node Returns the ASDisplayNode which provides the backing view to the view controller.
Declared In
ASDKViewController.h
overrideDisplayTraitsWithTraitCollection
Set this block to customize the ASDisplayTraits returned when the VC transitions to the given traitCollection.
@property (nonatomic, copy) ASDisplayTraitsForTraitCollectionBlock overrideDisplayTraitsWithTraitCollection
Declared In
ASDKViewController.h
overrideDisplayTraitsWithWindowSize
Set this block to customize the ASDisplayTraits returned when the VC transitions to the given window size.
@property (nonatomic, copy) ASDisplayTraitsForTraitWindowSizeBlock overrideDisplayTraitsWithWindowSize
Declared In
ASDKViewController.h
interfaceState
Passthrough property to the the .interfaceState of the node.
@property (nonatomic, readonly) ASInterfaceState interfaceState
Return Value
The current ASInterfaceState of the node, indicating whether it is visible and other situational properties.
See Also
Declared In
ASDKViewController.h
– nodeConstrainedSize
The constrained size used to measure the backing node.
- (ASSizeRange)nodeConstrainedSize
Discussion
Defaults to providing a size range that uses the view controller view’s bounds as both the min and max definitions. Override this method to provide a custom size range to the backing node.
Declared In
ASDKViewController.h