mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-04-02 17:07:58 +08:00
661 lines
18 KiB
HTML
661 lines
18 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<title>ASDisplayNode(Beta) Category Reference</title>
|
|
|
|
<link rel="stylesheet" href="../css/style.css">
|
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
|
|
<meta name="generator" content="appledoc 2.2.1 (build 1334)">
|
|
</head>
|
|
<body class="appledoc">
|
|
<header>
|
|
<div class="container" class="hide-in-xcode">
|
|
|
|
<h1 id="library-title">
|
|
<a href="../index.html">AsyncDisplayKit </a>
|
|
</h1>
|
|
|
|
<p id="developer-home">
|
|
<a href="../index.html">Facebook</a>
|
|
</p>
|
|
|
|
</div>
|
|
</header>
|
|
|
|
<aside>
|
|
<div class="container">
|
|
<nav>
|
|
<ul id="header-buttons" role="toolbar">
|
|
<li><a href="../index.html">Index</a></li>
|
|
<li><a href="../hierarchy.html">Hierarchy</a></li>
|
|
|
|
<li id="on-this-page" role="navigation">
|
|
<label>
|
|
On This Page
|
|
|
|
<div class="chevron">
|
|
<div class="chevy chevron-left"></div>
|
|
<div class="chevy chevron-right"></div>
|
|
</div>
|
|
|
|
<select id="jump-to">
|
|
<option value="top">Jump To…</option>
|
|
|
|
|
|
|
|
|
|
<option value="tasks">Tasks</option>
|
|
|
|
|
|
|
|
|
|
|
|
<optgroup label="Properties">
|
|
|
|
<option value="//api/name/didDisplayNodeContentWithRenderingContext">didDisplayNodeContentWithRenderingContext</option>
|
|
|
|
<option value="//api/name/willDisplayNodeContentWithRenderingContext">willDisplayNodeContentWithRenderingContext</option>
|
|
|
|
</optgroup>
|
|
|
|
|
|
|
|
|
|
|
|
<optgroup label="Instance Methods">
|
|
|
|
<option value="//api/name/animateLayoutTransition:">- animateLayoutTransition:</option>
|
|
|
|
<option value="//api/name/cancelLayoutTransitionsInProgress">- cancelLayoutTransitionsInProgress</option>
|
|
|
|
<option value="//api/name/didCompleteLayoutTransition:">- didCompleteLayoutTransition:</option>
|
|
|
|
<option value="//api/name/hierarchyDisplayDidFinish">- hierarchyDisplayDidFinish</option>
|
|
|
|
<option value="//api/name/placeholderShouldPersist">- placeholderShouldPersist</option>
|
|
|
|
<option value="//api/name/recursivelyEnsureDisplaySynchronously:">- recursivelyEnsureDisplaySynchronously:</option>
|
|
|
|
<option value="//api/name/transitionLayoutWithAnimation:shouldMeasureAsync:measurementCompletion:">- transitionLayoutWithAnimation:shouldMeasureAsync:measurementCompletion:</option>
|
|
|
|
<option value="//api/name/transitionLayoutWithSizeRange:animated:shouldMeasureAsync:measurementCompletion:">- transitionLayoutWithSizeRange:animated:shouldMeasureAsync:measurementCompletion:</option>
|
|
|
|
</optgroup>
|
|
|
|
|
|
</select>
|
|
</label>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</aside>
|
|
|
|
<article>
|
|
<div id="overview_contents" class="container">
|
|
<div id="content">
|
|
<main role="main">
|
|
<h1 class="title">ASDisplayNode(Beta) Category Reference</h1>
|
|
|
|
|
|
<div class="section section-specification"><table cellspacing="0"><tbody>
|
|
<tr>
|
|
<th>Declared in</th>
|
|
<td>ASDisplayNode+Beta.h</td>
|
|
</tr>
|
|
</tbody></table></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="section section-tasks">
|
|
<a title="Tasks" name="tasks"></a>
|
|
|
|
|
|
<a title="Layout" name="task_Layout"></a>
|
|
<h2 class="task-title">Layout</h2>
|
|
|
|
<div class="task-list">
|
|
<div class="section-method">
|
|
<a name="//api/name/recursivelyEnsureDisplaySynchronously:" title="recursivelyEnsureDisplaySynchronously:"></a>
|
|
<h3 class="method-title"><code><a href="#//api/name/recursivelyEnsureDisplaySynchronously:">– recursivelyEnsureDisplaySynchronously:</a></code>
|
|
</h3>
|
|
|
|
<div class="method-info">
|
|
<div class="pointy-thing"></div>
|
|
|
|
<div class="method-info-container">
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Recursively ensures node and all subnodes are displayed.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)recursivelyEnsureDisplaySynchronously:(BOOL)<em>synchronously</em></code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<p><code class="declared-in-ref">ASDisplayNode+Beta.h</code></p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div><div class="section-method">
|
|
<a name="//api/name/willDisplayNodeContentWithRenderingContext" title="willDisplayNodeContentWithRenderingContext"></a>
|
|
<h3 class="method-title"><code><a href="#//api/name/willDisplayNodeContentWithRenderingContext"> willDisplayNodeContentWithRenderingContext</a></code>
|
|
</h3>
|
|
|
|
<div class="method-info">
|
|
<div class="pointy-thing"></div>
|
|
|
|
<div class="method-info-container">
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>allow modification of a context before the node’s content is drawn</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, copy, nullable) ASDisplayNodeContextModifier willDisplayNodeContentWithRenderingContext</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Set the block to be called after the context has been created and before the node’s content is drawn.
|
|
You can override this to modify the context before the content is drawn. You are responsible for saving and
|
|
restoring context if necessary. Restoring can be done in contextDidDisplayNodeContent
|
|
This block can be called from <em>any</em> thread and it is unsafe to access any UIKit main thread properties from it.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<p><code class="declared-in-ref">ASDisplayNode+Beta.h</code></p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div><div class="section-method">
|
|
<a name="//api/name/didDisplayNodeContentWithRenderingContext" title="didDisplayNodeContentWithRenderingContext"></a>
|
|
<h3 class="method-title"><code><a href="#//api/name/didDisplayNodeContentWithRenderingContext"> didDisplayNodeContentWithRenderingContext</a></code>
|
|
</h3>
|
|
|
|
<div class="method-info">
|
|
<div class="pointy-thing"></div>
|
|
|
|
<div class="method-info-container">
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>allow modification of a context after the node’s content is drawn</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, copy, nullable) ASDisplayNodeContextModifier didDisplayNodeContentWithRenderingContext</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<p><code class="declared-in-ref">ASDisplayNode+Beta.h</code></p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<a title="Layout Transitioning" name="task_Layout Transitioning"></a>
|
|
<h2 class="task-title">Layout Transitioning</h2>
|
|
|
|
<div class="task-list">
|
|
<div class="section-method">
|
|
<a name="//api/name/animateLayoutTransition:" title="animateLayoutTransition:"></a>
|
|
<h3 class="method-title"><code><a href="#//api/name/animateLayoutTransition:">– animateLayoutTransition:</a></code>
|
|
</h3>
|
|
|
|
<div class="method-info">
|
|
<div class="pointy-thing"></div>
|
|
|
|
<div class="method-info-container">
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>A place to perform your animation. New nodes have been inserted here. You can also use this time to re-order the hierarchy.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)animateLayoutTransition:(id<ASContextTransitioning>)<em>context</em></code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>A place to perform your animation. New nodes have been inserted here. You can also use this time to re-order the hierarchy.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<p><code class="declared-in-ref">ASDisplayNode+Beta.h</code></p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div><div class="section-method">
|
|
<a name="//api/name/didCompleteLayoutTransition:" title="didCompleteLayoutTransition:"></a>
|
|
<h3 class="method-title"><code><a href="#//api/name/didCompleteLayoutTransition:">– didCompleteLayoutTransition:</a></code>
|
|
</h3>
|
|
|
|
<div class="method-info">
|
|
<div class="pointy-thing"></div>
|
|
|
|
<div class="method-info-container">
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>A place to clean up your nodes after the transition</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)didCompleteLayoutTransition:(id<ASContextTransitioning>)<em>context</em></code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>A place to clean up your nodes after the transition</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<p><code class="declared-in-ref">ASDisplayNode+Beta.h</code></p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div><div class="section-method">
|
|
<a name="//api/name/transitionLayoutWithSizeRange:animated:shouldMeasureAsync:measurementCompletion:" title="transitionLayoutWithSizeRange:animated:shouldMeasureAsync:measurementCompletion:"></a>
|
|
<h3 class="method-title"><code><a href="#//api/name/transitionLayoutWithSizeRange:animated:shouldMeasureAsync:measurementCompletion:">– transitionLayoutWithSizeRange:animated:shouldMeasureAsync:measurementCompletion:</a></code>
|
|
</h3>
|
|
|
|
<div class="method-info">
|
|
<div class="pointy-thing"></div>
|
|
|
|
<div class="method-info-container">
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Transitions the current layout with a new constrained size. Must be called on main thread.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)transitionLayoutWithSizeRange:(ASSizeRange)<em>constrainedSize</em> animated:(BOOL)<em>animated</em> shouldMeasureAsync:(BOOL)<em>shouldMeasureAsync</em> measurementCompletion:(nullable void ( ^ ) ( ))<em>completion</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
<table class="argument-def parameter-def">
|
|
|
|
<tr>
|
|
<th scope="row" class="argument-name"><code>animated</code></th>
|
|
<td><p>Animation is optional, but will still proceed through your <code>animateLayoutTransition</code> implementation with <code>isAnimated == NO</code>.</p></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th scope="row" class="argument-name"><code>shouldMeasureAsync</code></th>
|
|
<td><p>Measure the layout asynchronously.</p></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th scope="row" class="argument-name"><code>measurementCompletion</code></th>
|
|
<td><p>Optional completion block called only if a new layout is calculated.
|
|
It is called on main, right after the measurement and before -animateLayoutTransition:.</p></td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>If the passed constrainedSize is the the same as the node’s current constrained size, this method is noop.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection see-also-section">
|
|
<h4 class="method-subtitle">See Also</h4>
|
|
<ul>
|
|
|
|
<li><code><p><a href="#//api/name/animateLayoutTransition:">- animateLayoutTransition:</a></p></code></li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<p><code class="declared-in-ref">ASDisplayNode+Beta.h</code></p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div><div class="section-method">
|
|
<a name="//api/name/transitionLayoutWithAnimation:shouldMeasureAsync:measurementCompletion:" title="transitionLayoutWithAnimation:shouldMeasureAsync:measurementCompletion:"></a>
|
|
<h3 class="method-title"><code><a href="#//api/name/transitionLayoutWithAnimation:shouldMeasureAsync:measurementCompletion:">– transitionLayoutWithAnimation:shouldMeasureAsync:measurementCompletion:</a></code>
|
|
</h3>
|
|
|
|
<div class="method-info">
|
|
<div class="pointy-thing"></div>
|
|
|
|
<div class="method-info-container">
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Invalidates the current layout and begins a relayout of the node with the current <code>constrainedSize</code>. Must be called on main thread.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)transitionLayoutWithAnimation:(BOOL)<em>animated</em> shouldMeasureAsync:(BOOL)<em>shouldMeasureAsync</em> measurementCompletion:(nullable void ( ^ ) ( ))<em>completion</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
<table class="argument-def parameter-def">
|
|
|
|
<tr>
|
|
<th scope="row" class="argument-name"><code>animated</code></th>
|
|
<td><p>Animation is optional, but will still proceed through your <code>animateLayoutTransition</code> implementation with <code>isAnimated == NO</code>.</p></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th scope="row" class="argument-name"><code>shouldMeasureAsync</code></th>
|
|
<td><p>Measure the layout asynchronously.</p></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th scope="row" class="argument-name"><code>measurementCompletion</code></th>
|
|
<td><p>Optional completion block called only if a new layout is calculated.
|
|
It is called right after the measurement and before -animateLayoutTransition:.</p></td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection see-also-section">
|
|
<h4 class="method-subtitle">See Also</h4>
|
|
<ul>
|
|
|
|
<li><code><p><a href="#//api/name/animateLayoutTransition:">- animateLayoutTransition:</a></p></code></li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<p><code class="declared-in-ref">ASDisplayNode+Beta.h</code></p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div><div class="section-method">
|
|
<a name="//api/name/placeholderShouldPersist" title="placeholderShouldPersist"></a>
|
|
<h3 class="method-title"><code><a href="#//api/name/placeholderShouldPersist">– placeholderShouldPersist</a></code>
|
|
</h3>
|
|
|
|
<div class="method-info">
|
|
<div class="pointy-thing"></div>
|
|
|
|
<div class="method-info-container">
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Currently used by ASNetworkImageNode and ASMultiplexImageNode to allow their placeholders to stay if they are loading an image from the network.
|
|
Otherwise, a display pass is scheduled and completes, but does not actually draw anything - and ASDisplayNode considers the element finished.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (BOOL)placeholderShouldPersist</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<p><code class="declared-in-ref">ASDisplayNode+Beta.h</code></p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div><div class="section-method">
|
|
<a name="//api/name/cancelLayoutTransitionsInProgress" title="cancelLayoutTransitionsInProgress"></a>
|
|
<h3 class="method-title"><code><a href="#//api/name/cancelLayoutTransitionsInProgress">– cancelLayoutTransitionsInProgress</a></code>
|
|
</h3>
|
|
|
|
<div class="method-info">
|
|
<div class="pointy-thing"></div>
|
|
|
|
<div class="method-info-container">
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Cancels all performing layout transitions. Can be called on any thread.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)cancelLayoutTransitionsInProgress</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<p><code class="declared-in-ref">ASDisplayNode+Beta.h</code></p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div><div class="section-method">
|
|
<a name="//api/name/hierarchyDisplayDidFinish" title="hierarchyDisplayDidFinish"></a>
|
|
<h3 class="method-title"><code><a href="#//api/name/hierarchyDisplayDidFinish">– hierarchyDisplayDidFinish</a></code>
|
|
</h3>
|
|
|
|
<div class="method-info">
|
|
<div class="pointy-thing"></div>
|
|
|
|
<div class="method-info-container">
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Indicates that the receiver and all subnodes have finished displaying. May be called more than once, for example if the receiver has
|
|
a network image node. This is called after the first display pass even if network image nodes have not downloaded anything (text would be done,
|
|
and other nodes that are ready to do their final display). Each render of every progressive jpeg network node would cause this to be called, so
|
|
this hook could be called up to 1 + (pJPEGcount * pJPEGrenderCount) times. The render count depends on how many times the downloader calls the
|
|
progressImage block.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)hierarchyDisplayDidFinish</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<p><code class="declared-in-ref">ASDisplayNode+Beta.h</code></p>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</main>
|
|
|
|
<footer>
|
|
<div class="footer-copyright">
|
|
|
|
<p class="copyright">Copyright © 2016 Facebook. All rights reserved. Updated: 2016-07-11</p>
|
|
|
|
|
|
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
|
|
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
|
|
<script src="../js/script.js"></script>
|
|
</body>
|
|
</html> |