mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +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:
@@ -34,6 +34,27 @@ typedef CALayer * _Nonnull(^ASDisplayNodeLayerBlock)();
|
||||
*/
|
||||
typedef void (^ASDisplayNodeDidLoadBlock)(ASDisplayNode *node);
|
||||
|
||||
/**
|
||||
Interface state is available on ASDisplayNode and ASViewController, and
|
||||
allows checking whether a node is in an interface situation where it is prudent to trigger certain
|
||||
actions: measurement, data fetching, display, and visibility (the latter for animations or other onscreen-only effects).
|
||||
*/
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, ASInterfaceState)
|
||||
{
|
||||
/** The element is not predicted to be onscreen soon and preloading should not be performed */
|
||||
ASInterfaceStateNone = 1 << 0,
|
||||
/** The element may be added to a view soon that could become visible. Measure the layout, including size calculation. */
|
||||
ASInterfaceStateMeasureLayout = 1 << 1,
|
||||
/** The element is likely enough to come onscreen that disk and/or network data required for display should be fetched. */
|
||||
ASInterfaceStateFetchData = 1 << 2,
|
||||
/** The element is very likely to become visible, and concurrent rendering should be executed for any -setNeedsDisplay. */
|
||||
ASInterfaceStateDisplay = 1 << 3,
|
||||
/** The element is physically onscreen by at least 1 pixel.
|
||||
In practice, all other bit fields should also be set when this flag is set. */
|
||||
ASInterfaceStateVisible = 1 << 4,
|
||||
};
|
||||
|
||||
/**
|
||||
* An `ASDisplayNode` is an abstraction over `UIView` and `CALayer` that allows you to perform calculations about a view
|
||||
* hierarchy off the main thread, and could do rendering off the main thread as well.
|
||||
@@ -125,7 +146,6 @@ typedef void (^ASDisplayNodeDidLoadBlock)(ASDisplayNode *node);
|
||||
|
||||
/** @name Getting view and layer */
|
||||
|
||||
|
||||
/**
|
||||
* @abstract Returns a view.
|
||||
*
|
||||
@@ -162,10 +182,17 @@ typedef void (^ASDisplayNodeDidLoadBlock)(ASDisplayNode *node);
|
||||
*/
|
||||
@property (nonatomic, readonly, retain) CALayer *layer;
|
||||
|
||||
/**
|
||||
* @abstract Returns the Interface State of the node.
|
||||
*
|
||||
* @return The current ASInterfaceState of the node, indicating whether it is visible and other situational properties.
|
||||
*
|
||||
* @see ASInterfaceState
|
||||
*/
|
||||
@property (nonatomic, readonly) ASInterfaceState interfaceState;
|
||||
|
||||
/** @name Managing dimensions */
|
||||
|
||||
|
||||
/**
|
||||
* @abstract Asks the node to measure and return the size that best fits its subnodes.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user