mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-04-13 22:38:27 +08:00
@@ -189,12 +189,12 @@
|
||||
|
||||
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Converting Between View Coordinate Systems">Converting Between View Coordinate Systems</a></span></li>
|
||||
|
||||
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_ASDisplayNodeSubclasses Methods">ASDisplayNodeSubclasses Methods</a></span></li>
|
||||
|
||||
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_UIViewBridge Methods">UIViewBridge Methods</a></span></li>
|
||||
|
||||
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Debugging Methods">Debugging Methods</a></span></li>
|
||||
|
||||
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_ASDisplayNodeSubclasses Methods">ASDisplayNodeSubclasses Methods</a></span></li>
|
||||
|
||||
</ul></li>
|
||||
|
||||
|
||||
@@ -373,24 +373,6 @@ necessary declarations and conveniences.</p>
|
||||
<p>Commons reasons to subclass includes making a <code>UIView</code> property available and receiving a callback after async
|
||||
display.</p>
|
||||
|
||||
<p>The subclass header <em>ASDisplayNode+Subclasses</em> defines the following methods that either must or can be overriden by
|
||||
subclasses of ASDisplayNode.</p>
|
||||
|
||||
<p>These methods should never be called directly by other classes.</p>
|
||||
|
||||
<h2>Drawing</h2>
|
||||
|
||||
<p>Implement one of +displayAsyncLayer:parameters:isCancelled: or +drawRect:withParameters:isCancelled: to provide
|
||||
drawing for your node.</p>
|
||||
|
||||
<p>Use <a href="#//api/name/drawParametersForAsyncLayer:">drawParametersForAsyncLayer:</a> to copy any properties that are involved in drawing into an immutable object for
|
||||
use on the display queue. The display and drawRect implementations <em>MUST</em> be thread-safe, as they can be called on
|
||||
the displayQueue (asynchronously) or the main thread (synchronously/<a href="#//api/name/displayImmediately">displayImmediately</a>).</p>
|
||||
|
||||
<p>Class methods that require passing in copies of the values are used to minimize the need for locking around instance
|
||||
variable access, and the possibility of the a<a href="#//api/name/synchronous">synchronous</a> display pass grabbing an inconsistent state across multiple
|
||||
variables.</p>
|
||||
|
||||
<h2>UIView bridge</h2>
|
||||
|
||||
<p>ASDisplayNode provides thread-safe access to most of UIView and CALayer properties and methods, traditionally unsafe.</p>
|
||||
@@ -650,6 +632,40 @@ or <a href="#//api/name/layer">layer</a> property is accessed).</p>
|
||||
</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<a title="UIViewBridge Methods" name="task_UIViewBridge Methods"></a>
|
||||
<h3 class="subsubtitle task-title">UIViewBridge Methods</h3>
|
||||
|
||||
<ul class="task-list">
|
||||
<li>
|
||||
<span class="tooltip">
|
||||
<code><a href="#//api/name/backgroundColor"> backgroundColor</a></code>
|
||||
</span>
|
||||
<span class="task-item-suffix">property</span>
|
||||
|
||||
</li><li>
|
||||
<span class="tooltip">
|
||||
<code><a href="#//api/name/contentMode"> contentMode</a></code>
|
||||
</span>
|
||||
<span class="task-item-suffix">property</span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<a title="Debugging Methods" name="task_Debugging Methods"></a>
|
||||
<h3 class="subsubtitle task-title">Debugging Methods</h3>
|
||||
|
||||
<ul class="task-list">
|
||||
<li>
|
||||
<span class="tooltip">
|
||||
<code><a href="#//api/name/displayNodeRecursiveDescription">– displayNodeRecursiveDescription</a></code>
|
||||
</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -784,40 +800,6 @@ or <a href="#//api/name/layer">layer</a> property is accessed).</p>
|
||||
</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<a title="UIViewBridge Methods" name="task_UIViewBridge Methods"></a>
|
||||
<h3 class="subsubtitle task-title">UIViewBridge Methods</h3>
|
||||
|
||||
<ul class="task-list">
|
||||
<li>
|
||||
<span class="tooltip">
|
||||
<code><a href="#//api/name/backgroundColor"> backgroundColor</a></code>
|
||||
</span>
|
||||
<span class="task-item-suffix">property</span>
|
||||
|
||||
</li><li>
|
||||
<span class="tooltip">
|
||||
<code><a href="#//api/name/contentMode"> contentMode</a></code>
|
||||
</span>
|
||||
<span class="task-item-suffix">property</span>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<a title="Debugging Methods" name="task_Debugging Methods"></a>
|
||||
<h3 class="subsubtitle task-title">Debugging Methods</h3>
|
||||
|
||||
<ul class="task-list">
|
||||
<li>
|
||||
<span class="tooltip">
|
||||
<code><a href="#//api/name/displayNodeRecursiveDescription">– displayNodeRecursiveDescription</a></code>
|
||||
</span>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1030,8 +1012,8 @@ contentMode for your content while it’s being re-rendered.</p>
|
||||
<div class="method-subsection discussion-section">
|
||||
<h4 class="method-subtitle">Discussion</h4>
|
||||
<p>Use <a href="#//api/name/setNeedsDisplayAtScale:">setNeedsDisplayAtScale:</a> to set a value and then after display, the display node will set the layer’s
|
||||
<a href="#//api/name/contentsScale">contentsScale</a>. This is to prevent jumps when re-rasterizing at a different <a href="#//api/name/contentsScale">contentsScale</a>.
|
||||
Read this property if you need to know the future <a href="#//api/name/contentsScale">contentsScale</a> of your <a href="#//api/name/layer">layer</a>, eg in drawParameters.</p>
|
||||
contentsScale. This is to prevent jumps when re-rasterizing at a different contentsScale.
|
||||
Read this property if you need to know the future contentsScale of your <a href="#//api/name/layer">layer</a>, eg in drawParameters.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1585,7 +1567,7 @@ well.</p></div>
|
||||
|
||||
|
||||
<div class="method-subsection brief-description">
|
||||
<p>@summary Delegate override to provide new <a href="#//api/name/layer">layer</a> <a href="#//api/name/contents">contents</a> as a UIImage.</p>
|
||||
<p>@summary Delegate override to provide new <a href="#//api/name/layer">layer</a> contents as a UIImage.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1615,7 +1597,7 @@ unnecessary work. A return value of YES means cancel drawing and return.</p></dd
|
||||
|
||||
<div class="method-subsection return">
|
||||
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
||||
<p>A UIImage with <a href="#//api/name/contents">contents</a> that are ready to display on the main thread. Make sure that the image is already
|
||||
<p>A UIImage with contents that are ready to display on the main thread. Make sure that the image is already
|
||||
decoded before returning it here.</p>
|
||||
</div>
|
||||
|
||||
@@ -1649,7 +1631,7 @@ decoded before returning it here.</p>
|
||||
|
||||
|
||||
<div class="method-subsection brief-description">
|
||||
<p>@summary Delegate method to draw <a href="#//api/name/layer">layer</a> <a href="#//api/name/contents">contents</a> into a CGBitmapContext. The current UIGraphics context will be set
|
||||
<p>@summary Delegate method to draw <a href="#//api/name/layer">layer</a> contents into a CGBitmapContext. The current UIGraphics context will be set
|
||||
to an appropriate context.</p>
|
||||
</div>
|
||||
|
||||
@@ -1671,7 +1653,7 @@ to an appropriate context.</p>
|
||||
<dl class="argument-def parameter-def">
|
||||
<dt><em>isRasterizing</em></dt>
|
||||
<dd><p>YES if the <a href="#//api/name/layer">layer</a> is being rasterized into another <a href="#//api/name/layer">layer</a>, in which case drawRect: probably wants
|
||||
to avoid doing things like filling its <a href="#//api/name/bounds">bounds</a> with a zero<a href="#//api/name/alpha">alpha</a> color to clear the backing store.</p></dd>
|
||||
to avoid doing things like filling its bounds with a zero-alpha color to clear the backing store.</p></dd>
|
||||
</dl>
|
||||
|
||||
<dl class="argument-def parameter-def">
|
||||
@@ -2385,7 +2367,7 @@ completed.</p>
|
||||
|
||||
<dl class="argument-def parameter-def">
|
||||
<dt><em>point</em></dt>
|
||||
<dd><p>A point specified in the node’s local coordinate system (<a href="#//api/name/bounds">bounds</a>).</p></dd>
|
||||
<dd><p>A point specified in the node’s local coordinate system (bounds).</p></dd>
|
||||
</dl>
|
||||
|
||||
<dl class="argument-def parameter-def">
|
||||
@@ -2783,7 +2765,7 @@ even if there are other non-displaynode views.</p>
|
||||
<div class="method-subsection discussion-section">
|
||||
<h4 class="method-subtitle">Discussion</h4>
|
||||
<p>Subclasses should call this method to invalidate the previously measured and cached size for the display
|
||||
node, when the <a href="#//api/name/contents">contents</a> of the node change in such a way as to require measuring it again.</p>
|
||||
node, when the contents of the node change in such a way as to require measuring it again.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3215,7 +3197,7 @@ If replacementSubnode is nil, this method will throw an exception</p>
|
||||
|
||||
|
||||
<div class="method-subsection brief-description">
|
||||
<p>Marks the receiver’s <a href="#//api/name/bounds">bounds</a> as needing to be redrawn, with a scale value.</p>
|
||||
<p>Marks the receiver’s bounds as needing to be redrawn, with a scale value.</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -3232,7 +3214,7 @@ If replacementSubnode is nil, this method will throw an exception</p>
|
||||
|
||||
<div class="method-subsection discussion-section">
|
||||
<h4 class="method-subtitle">Discussion</h4>
|
||||
<p>Subclasses should override this if they don’t want their <a href="#//api/name/contentsScale">contentsScale</a> changed.</p><div class="note"><p><strong>Note:</strong> This changes an internal property.</p></div>
|
||||
<p>Subclasses should override this if they don’t want their contentsScale changed.</p><div class="note"><p><strong>Note:</strong> This changes an internal property.</p></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
<meta name="viewport" content="width=device-width initial-scale=1" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<meta property="og:title" content="Custom nodes — AsyncDisplayKit">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="http://facebook.github.io/AsyncDisplayKit/guide/2/">
|
||||
<meta property="og:image" content="https://github.com/facebook/AsyncDisplayKit/raw/master/docs/assets/logo-square.png">
|
||||
<meta property="og:description" content="Smooth asynchronous user interfaces for iOS apps">
|
||||
|
||||
<title>Custom nodes — AsyncDisplayKit</title>
|
||||
<meta name="description" content="Smooth asynchronous user interfaces for iOS apps.">
|
||||
|
||||
@@ -33,6 +39,7 @@
|
||||
|
||||
<div class="trigger">
|
||||
<a class="page-link page-link-active" href="/AsyncDisplayKit/guide">guide</a>
|
||||
<a class="page-link" href="/AsyncDisplayKit/appledoc">appledoc</a>
|
||||
<a class="page-link" href="https://github.com/facebook/AsyncDisplayKit">github</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
<meta name="viewport" content="width=device-width initial-scale=1" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<meta property="og:title" content="Asynchronous display — AsyncDisplayKit">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="http://facebook.github.io/AsyncDisplayKit/guide/3/">
|
||||
<meta property="og:image" content="https://github.com/facebook/AsyncDisplayKit/raw/master/docs/assets/logo-square.png">
|
||||
<meta property="og:description" content="Smooth asynchronous user interfaces for iOS apps">
|
||||
|
||||
<title>Asynchronous display — AsyncDisplayKit</title>
|
||||
<meta name="description" content="Smooth asynchronous user interfaces for iOS apps.">
|
||||
|
||||
@@ -33,6 +39,7 @@
|
||||
|
||||
<div class="trigger">
|
||||
<a class="page-link page-link-active" href="/AsyncDisplayKit/guide">guide</a>
|
||||
<a class="page-link" href="/AsyncDisplayKit/appledoc">appledoc</a>
|
||||
<a class="page-link" href="https://github.com/facebook/AsyncDisplayKit">github</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
<meta name="viewport" content="width=device-width initial-scale=1" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<meta property="og:title" content="Making the most of AsyncDisplayKit — AsyncDisplayKit">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="http://facebook.github.io/AsyncDisplayKit/guide/4/">
|
||||
<meta property="og:image" content="https://github.com/facebook/AsyncDisplayKit/raw/master/docs/assets/logo-square.png">
|
||||
<meta property="og:description" content="Smooth asynchronous user interfaces for iOS apps">
|
||||
|
||||
<title>Making the most of AsyncDisplayKit — AsyncDisplayKit</title>
|
||||
<meta name="description" content="Smooth asynchronous user interfaces for iOS apps.">
|
||||
|
||||
@@ -33,6 +39,7 @@
|
||||
|
||||
<div class="trigger">
|
||||
<a class="page-link page-link-active" href="/AsyncDisplayKit/guide">guide</a>
|
||||
<a class="page-link" href="/AsyncDisplayKit/appledoc">appledoc</a>
|
||||
<a class="page-link" href="https://github.com/facebook/AsyncDisplayKit">github</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
<meta name="viewport" content="width=device-width initial-scale=1" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<meta property="og:title" content="Under the hood — AsyncDisplayKit">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="http://facebook.github.io/AsyncDisplayKit/guide/5/">
|
||||
<meta property="og:image" content="https://github.com/facebook/AsyncDisplayKit/raw/master/docs/assets/logo-square.png">
|
||||
<meta property="og:description" content="Smooth asynchronous user interfaces for iOS apps">
|
||||
|
||||
<title>Under the hood — AsyncDisplayKit</title>
|
||||
<meta name="description" content="Smooth asynchronous user interfaces for iOS apps.">
|
||||
|
||||
@@ -33,6 +39,7 @@
|
||||
|
||||
<div class="trigger">
|
||||
<a class="page-link page-link-active" href="/AsyncDisplayKit/guide">guide</a>
|
||||
<a class="page-link" href="/AsyncDisplayKit/appledoc">appledoc</a>
|
||||
<a class="page-link" href="https://github.com/facebook/AsyncDisplayKit">github</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
<meta name="viewport" content="width=device-width initial-scale=1" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<meta property="og:title" content="Getting started — AsyncDisplayKit">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="http://facebook.github.io/AsyncDisplayKit/guide/">
|
||||
<meta property="og:image" content="https://github.com/facebook/AsyncDisplayKit/raw/master/docs/assets/logo-square.png">
|
||||
<meta property="og:description" content="Smooth asynchronous user interfaces for iOS apps">
|
||||
|
||||
<title>Getting started — AsyncDisplayKit</title>
|
||||
<meta name="description" content="Smooth asynchronous user interfaces for iOS apps.">
|
||||
|
||||
@@ -33,6 +39,7 @@
|
||||
|
||||
<div class="trigger">
|
||||
<a class="page-link page-link-active" href="/AsyncDisplayKit/guide">guide</a>
|
||||
<a class="page-link" href="/AsyncDisplayKit/appledoc">appledoc</a>
|
||||
<a class="page-link" href="https://github.com/facebook/AsyncDisplayKit">github</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
<meta name="viewport" content="width=device-width initial-scale=1" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<meta property="og:title" content="Smooth asynchronous user interfaces for iOS apps — AsyncDisplayKit">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="http://facebook.github.io/AsyncDisplayKit/index.html">
|
||||
<meta property="og:image" content="https://github.com/facebook/AsyncDisplayKit/raw/master/docs/assets/logo-square.png">
|
||||
<meta property="og:description" content="Smooth asynchronous user interfaces for iOS apps">
|
||||
|
||||
<title>Smooth asynchronous user interfaces for iOS apps — AsyncDisplayKit</title>
|
||||
<meta name="description" content="Smooth asynchronous user interfaces for iOS apps.">
|
||||
|
||||
@@ -33,6 +39,7 @@
|
||||
|
||||
<div class="trigger">
|
||||
<a class="page-link" href="/AsyncDisplayKit/guide">guide</a>
|
||||
<a class="page-link" href="/AsyncDisplayKit/appledoc">appledoc</a>
|
||||
<a class="page-link" href="https://github.com/facebook/AsyncDisplayKit">github</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -6,6 +6,12 @@
|
||||
<meta name="viewport" content="width=device-width initial-scale=1" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<meta property="og:title" content="License — AsyncDisplayKit">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="http://facebook.github.io/AsyncDisplayKit/license/">
|
||||
<meta property="og:image" content="https://github.com/facebook/AsyncDisplayKit/raw/master/docs/assets/logo-square.png">
|
||||
<meta property="og:description" content="Smooth asynchronous user interfaces for iOS apps">
|
||||
|
||||
<title>License — AsyncDisplayKit</title>
|
||||
<meta name="description" content="Smooth asynchronous user interfaces for iOS apps.">
|
||||
|
||||
@@ -33,6 +39,7 @@
|
||||
|
||||
<div class="trigger">
|
||||
<a class="page-link" href="/AsyncDisplayKit/guide">guide</a>
|
||||
<a class="page-link" href="/AsyncDisplayKit/appledoc">appledoc</a>
|
||||
<a class="page-link" href="https://github.com/facebook/AsyncDisplayKit">github</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user