CBCNode
@interface CBCNode : NSObject
A node describes a single navigable page in the Catalog by Convention.
A node either has children or it is an example.
- If a node has children, then the node should be represented by a list of some sort.
- If a node is an example, then the example controller can be instantiated with createExampleViewController.
-
Nodes cannot be created by clients.
Declaration
Objective-C
- (nullable instancetype)init;
Swift
init?()
-
The title for this node.
Declaration
Objective-C
@property (readonly, copy, nonatomic, nonnull) NSString *title;
-
The description for this node.
Declaration
Objective-C
@property (readonly, copy, nonatomic, nonnull) NSString *nodeDescription;
-
The children of this node.
Declaration
Objective-C
@property (readwrite, strong, nonatomic, nonnull) NSArray<CBCNode *> *children;
-
Returns YES if this is an example node.
Declaration
Objective-C
- (BOOL)isExample;
Swift
func isExample() -> AnyObject!
-
Returns YES if this the primary demo for this component.
Can only return YES if isExample also returns YES.
Declaration
Objective-C
- (BOOL)isPrimaryDemo;
Swift
func isPrimaryDemo() -> AnyObject!
-
Returns String representation of exampleViewController class name if it exists
Declaration
Objective-C
- (nullable NSString *)exampleViewControllerName;
Swift
func exampleViewControllerName() -> AnyObject!
-
Returns an instance of a UIViewController for presentation purposes.
Check that isExample returns YES before invoking.
Declaration
Objective-C
- (nonnull UIViewController *)createExampleViewController;
Swift
func createExampleViewController() -> AnyObject!
-
Returns a description of the example.
Check that isExample returns YES before invoking.
Declaration
Objective-C
- (nonnull NSString *)exampleDescription;
Swift
func exampleDescription() -> AnyObject!