mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Merge branch 'master' into update-objc
Conflicts: AsyncDisplayKit/ASDisplayNodeExtras.h AsyncDisplayKit/Details/ASTextNodeRenderer.h AsyncDisplayKit/Details/ASTextNodeShadower.h
This commit is contained in:
@@ -26,6 +26,19 @@ extern ASDisplayNode * _Nullable ASLayerToDisplayNode(CALayer * _Nullable layer)
|
||||
*/
|
||||
extern ASDisplayNode * _Nullable ASViewToDisplayNode(UIView * _Nullable view);
|
||||
|
||||
/**
|
||||
Given a node, returns the root of the node heirarchy (where supernode == nil)
|
||||
*/
|
||||
extern ASDisplayNode *ASDisplayNodeUltimateParentOfNode(ASDisplayNode *node);
|
||||
|
||||
/**
|
||||
This function will walk the layer heirarchy, spanning discontinuous sections of the node heirarchy (e.g. the layers
|
||||
of UIKit intermediate views in UIViewControllers, UITableView, UICollectionView).
|
||||
In the event that a node's backing layer is not created yet, the function will only walk the direct subnodes instead
|
||||
of forcing the layer heirarchy to be created.
|
||||
*/
|
||||
extern void ASDisplayNodePerformBlockOnEveryNode(CALayer *layer, ASDisplayNode *node, void(^block)(ASDisplayNode *node));
|
||||
|
||||
/**
|
||||
Given a display node, traverses up the layer tree hierarchy, returning the first display node that passes block.
|
||||
*/
|
||||
@@ -37,7 +50,17 @@ extern id ASDisplayNodeFind(ASDisplayNode * _Nullable node, BOOL (^block)(ASDisp
|
||||
extern id ASDisplayNodeFindClass(ASDisplayNode *start, Class c);
|
||||
|
||||
/**
|
||||
Given a display node, collects all descendents. This is a specialization of ASCollectContainer() that walks the Core Animation layer tree as opposed to the display node tree, thus supporting non-continuous display node hierarchies.
|
||||
* Given two nodes, finds their most immediate common parent. Used for geometry conversion methods.
|
||||
* NOTE: It is an error to try to convert between nodes which do not share a common ancestor. This behavior is
|
||||
* disallowed in UIKit documentation and the behavior is left undefined. The output does not have a rigorously defined
|
||||
* failure mode (i.e. returning CGPointZero or returning the point exactly as passed in). Rather than track the internal
|
||||
* undefined and undocumented behavior of UIKit in ASDisplayNode, this operation is defined to be incorrect in all
|
||||
* circumstances and must be fixed wherever encountered.
|
||||
*/
|
||||
extern ASDisplayNode * _Nullable ASDisplayNodeFindClosestCommonAncestor(ASDisplayNode *node1, ASDisplayNode *node2);
|
||||
|
||||
/**
|
||||
Given a display node, collects all descendents. This is a specialization of ASCollectContainer() that walks the Core Animation layer tree as opposed to the display node tree, thus supporting non-continues display node hierarchies.
|
||||
*/
|
||||
extern NSArray<ASDisplayNode *> *ASCollectDisplayNodes(ASDisplayNode *node);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user