mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Fix the Initialization Hierarchy (#3207)
* Fix the initializers setup * Update Swift example * Remove incorrect comment * Add one to ASTableNode
This commit is contained in:
@@ -125,7 +125,7 @@ extern NSInteger const ASDefaultDrawingPriority;
|
||||
* @return An ASDisplayNode instance whose view will be a subclass that enables asynchronous rendering, and passes
|
||||
* through -layout and touch handling methods.
|
||||
*/
|
||||
- (instancetype)init;
|
||||
- (instancetype)init NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
|
||||
/**
|
||||
@@ -183,6 +183,28 @@ extern NSInteger const ASDefaultDrawingPriority;
|
||||
*/
|
||||
- (void)onDidLoad:(ASDisplayNodeDidLoadBlock)body;
|
||||
|
||||
/**
|
||||
* Set the block that should be used to load this node's view.
|
||||
*
|
||||
* @param viewBlock The block that creates a view for this node.
|
||||
*
|
||||
* @precondition The node is not yet loaded.
|
||||
*
|
||||
* @note You will usually NOT call this. See the limitations documented in @c initWithViewBlock:
|
||||
*/
|
||||
- (void)setViewBlock:(ASDisplayNodeViewBlock)viewBlock;
|
||||
|
||||
/**
|
||||
* Set the block that should be used to load this node's layer.
|
||||
*
|
||||
* @param viewBlock The block that creates a layer for this node.
|
||||
*
|
||||
* @precondition The node is not yet loaded.
|
||||
*
|
||||
* @note You will usually NOT call this. See the limitations documented in @c initWithLayerBlock:
|
||||
*/
|
||||
- (void)setLayerBlock:(ASDisplayNodeLayerBlock)layerBlock;
|
||||
|
||||
/**
|
||||
* @abstract Returns whether the node is synchronous.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user