mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-05-20 22:09:23 +08:00
2032 lines
54 KiB
HTML
2032 lines
54 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
|
|
<title>ASDisplayNode(Subclassing) Category Reference</title>
|
|
<meta id="xcode-display" name="xcode-display" content="render"/>
|
|
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
|
|
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
|
|
<meta name="generator" content="appledoc 2.2 (build 963)" />
|
|
</head>
|
|
<body>
|
|
<header id="top_header">
|
|
<div id="library" class="hideInXcode">
|
|
<h1><a id="libraryTitle" href="../index.html">AsyncDisplayKit </a></h1>
|
|
<a id="developerHome" href="../index.html">Facebook</a>
|
|
</div>
|
|
|
|
<div id="title" role="banner">
|
|
<h1 class="hideInXcode">ASDisplayNode(Subclassing) Category Reference</h1>
|
|
</div>
|
|
<ul id="headerButtons" role="toolbar">
|
|
<li id="toc_button">
|
|
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
|
|
</li>
|
|
<li id="jumpto_button" role="navigation">
|
|
<select id="jumpTo">
|
|
<option value="top">Jump To…</option>
|
|
|
|
<option value="overview">Overview</option>
|
|
|
|
|
|
|
|
|
|
<option value="tasks">Tasks</option>
|
|
|
|
|
|
|
|
|
|
|
|
<option value="properties">Properties</option>
|
|
|
|
<option value="//api/name/contentsScaleForDisplay"> contentsScaleForDisplay</option>
|
|
|
|
<option value="//api/name/inHierarchy"> inHierarchy</option>
|
|
|
|
|
|
|
|
|
|
<option value="class_methods">Class Methods</option>
|
|
|
|
<option value="//api/name/displayWithParameters:isCancelled:"> + displayWithParameters:isCancelled:</option>
|
|
|
|
<option value="//api/name/drawRect:withParameters:isCancelled:isRasterizing:"> + drawRect:withParameters:isCancelled:isRasterizing:</option>
|
|
|
|
<option value="//api/name/viewClass"> + viewClass</option>
|
|
|
|
|
|
|
|
|
|
<option value="instance_methods">Instance Methods</option>
|
|
|
|
<option value="//api/name/calculateSizeThatFits:"> - calculateSizeThatFits:</option>
|
|
|
|
<option value="//api/name/descriptionForRecursiveDescription"> - descriptionForRecursiveDescription</option>
|
|
|
|
<option value="//api/name/didExitHierarchy"> - didExitHierarchy</option>
|
|
|
|
<option value="//api/name/didLoad"> - didLoad</option>
|
|
|
|
<option value="//api/name/displayDidFinish"> - displayDidFinish</option>
|
|
|
|
<option value="//api/name/displayWillStart"> - displayWillStart</option>
|
|
|
|
<option value="//api/name/drawParametersForAsyncLayer:"> - drawParametersForAsyncLayer:</option>
|
|
|
|
<option value="//api/name/gestureRecognizerShouldBegin:"> - gestureRecognizerShouldBegin:</option>
|
|
|
|
<option value="//api/name/hitTest:withEvent:"> - hitTest:withEvent:</option>
|
|
|
|
<option value="//api/name/invalidateCalculatedSize"> - invalidateCalculatedSize</option>
|
|
|
|
<option value="//api/name/layout"> - layout</option>
|
|
|
|
<option value="//api/name/layoutDidFinish"> - layoutDidFinish</option>
|
|
|
|
<option value="//api/name/placeholderImage"> - placeholderImage</option>
|
|
|
|
<option value="//api/name/reclaimMemory"> - reclaimMemory</option>
|
|
|
|
<option value="//api/name/recursivelySetNeedsDisplayAtScale:"> - recursivelySetNeedsDisplayAtScale:</option>
|
|
|
|
<option value="//api/name/setNeedsDisplayAtScale:"> - setNeedsDisplayAtScale:</option>
|
|
|
|
<option value="//api/name/subnodeDisplayDidFinish:"> - subnodeDisplayDidFinish:</option>
|
|
|
|
<option value="//api/name/subnodeDisplayWillStart:"> - subnodeDisplayWillStart:</option>
|
|
|
|
<option value="//api/name/touchesBegan:withEvent:"> - touchesBegan:withEvent:</option>
|
|
|
|
<option value="//api/name/touchesCancelled:withEvent:"> - touchesCancelled:withEvent:</option>
|
|
|
|
<option value="//api/name/touchesEnded:withEvent:"> - touchesEnded:withEvent:</option>
|
|
|
|
<option value="//api/name/touchesMoved:withEvent:"> - touchesMoved:withEvent:</option>
|
|
|
|
<option value="//api/name/willEnterHierarchy"> - willEnterHierarchy</option>
|
|
|
|
|
|
|
|
</select>
|
|
</li>
|
|
</ul>
|
|
</header>
|
|
<nav id="tocContainer" class="isShowingTOC">
|
|
<ul id="toc" role="tree">
|
|
|
|
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
|
|
|
|
|
|
|
|
|
|
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_View Configuration">View Configuration</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Properties">Properties</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_View Lifecycle">View Lifecycle</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Layout">Layout</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Sizing">Sizing</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Drawing">Drawing</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Touch handling">Touch handling</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Managing Gesture Recognizers">Managing Gesture Recognizers</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Hit Testing">Hit Testing</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Observing node-related changes">Observing node-related changes</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Placeholders">Placeholders</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Description">Description</a></span></li>
|
|
|
|
</ul></li>
|
|
|
|
|
|
|
|
|
|
|
|
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/contentsScaleForDisplay">contentsScaleForDisplay</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/inHierarchy">inHierarchy</a></span></li>
|
|
|
|
</ul></li>
|
|
|
|
|
|
|
|
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/displayWithParameters:isCancelled:">displayWithParameters:isCancelled:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/drawRect:withParameters:isCancelled:isRasterizing:">drawRect:withParameters:isCancelled:isRasterizing:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/viewClass">viewClass</a></span></li>
|
|
|
|
</ul></li>
|
|
|
|
|
|
|
|
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/calculateSizeThatFits:">calculateSizeThatFits:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/descriptionForRecursiveDescription">descriptionForRecursiveDescription</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/didExitHierarchy">didExitHierarchy</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/didLoad">didLoad</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/displayDidFinish">displayDidFinish</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/displayWillStart">displayWillStart</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/drawParametersForAsyncLayer:">drawParametersForAsyncLayer:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/gestureRecognizerShouldBegin:">gestureRecognizerShouldBegin:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/hitTest:withEvent:">hitTest:withEvent:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/invalidateCalculatedSize">invalidateCalculatedSize</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/layout">layout</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/layoutDidFinish">layoutDidFinish</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/placeholderImage">placeholderImage</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/reclaimMemory">reclaimMemory</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/recursivelySetNeedsDisplayAtScale:">recursivelySetNeedsDisplayAtScale:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setNeedsDisplayAtScale:">setNeedsDisplayAtScale:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/subnodeDisplayDidFinish:">subnodeDisplayDidFinish:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/subnodeDisplayWillStart:">subnodeDisplayWillStart:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/touchesBegan:withEvent:">touchesBegan:withEvent:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/touchesCancelled:withEvent:">touchesCancelled:withEvent:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/touchesEnded:withEvent:">touchesEnded:withEvent:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/touchesMoved:withEvent:">touchesMoved:withEvent:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/willEnterHierarchy">willEnterHierarchy</a></span></li>
|
|
|
|
</ul></li>
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
<article>
|
|
<div id="contents" class="isShowingTOC" role="main">
|
|
<a title="ASDisplayNode(Subclassing) Category Reference" name="top"></a>
|
|
<div class="main-navigation navigation-top">
|
|
<ul>
|
|
<li><a href="../index.html">Index</a></li>
|
|
<li><a href="../hierarchy.html">Hierarchy</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="header">
|
|
<div class="section-header">
|
|
<h1 class="title title-header">ASDisplayNode(Subclassing) Category Reference</h1>
|
|
</div>
|
|
</div>
|
|
<div id="container">
|
|
|
|
<div class="section section-specification"><table cellspacing="0"><tbody>
|
|
<tr>
|
|
<td class="specification-title">Declared in</td>
|
|
<td class="specification-value">ASDisplayNode+Subclasses.h</td>
|
|
</tr>
|
|
</tbody></table></div>
|
|
|
|
|
|
|
|
|
|
<div class="section section-overview">
|
|
<a title="Overview" name="overview"></a>
|
|
<h2 class="subtitle subtitle-overview">Overview</h2>
|
|
<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 +displayWithParameters:isCancelled: or +drawRect:withParameters:isCancelled: to provide
|
|
drawing for your node.</p>
|
|
|
|
<p>Use -drawParametersForAsyncLayer: 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/displayImmediately).</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 asynchronous display pass grabbing an inconsistent state across multiple
|
|
variables.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="section section-tasks">
|
|
<a title="Tasks" name="tasks"></a>
|
|
<h2 class="subtitle subtitle-tasks">Tasks</h2>
|
|
|
|
|
|
<a title="View Configuration" name="task_View Configuration"></a>
|
|
<h3 class="subsubtitle task-title">View Configuration</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/viewClass">+ viewClass</a></code>
|
|
</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Properties" name="task_Properties"></a>
|
|
<h3 class="subsubtitle task-title">Properties</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/contentsScaleForDisplay"> contentsScaleForDisplay</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/inHierarchy"> inHierarchy</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="View Lifecycle" name="task_View Lifecycle"></a>
|
|
<h3 class="subsubtitle task-title">View Lifecycle</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/didLoad">– didLoad</a></code>
|
|
</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Layout" name="task_Layout"></a>
|
|
<h3 class="subsubtitle task-title">Layout</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/layout">– layout</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/layoutDidFinish">– layoutDidFinish</a></code>
|
|
</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Sizing" name="task_Sizing"></a>
|
|
<h3 class="subsubtitle task-title">Sizing</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/calculateSizeThatFits:">– calculateSizeThatFits:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/invalidateCalculatedSize">– invalidateCalculatedSize</a></code>
|
|
</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Drawing" name="task_Drawing"></a>
|
|
<h3 class="subsubtitle task-title">Drawing</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/drawRect:withParameters:isCancelled:isRasterizing:">+ drawRect:withParameters:isCancelled:isRasterizing:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/displayWithParameters:isCancelled:">+ displayWithParameters:isCancelled:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/drawParametersForAsyncLayer:">– drawParametersForAsyncLayer:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/displayWillStart">– displayWillStart</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/displayDidFinish">– displayDidFinish</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/subnodeDisplayWillStart:">– subnodeDisplayWillStart:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/subnodeDisplayDidFinish:">– subnodeDisplayDidFinish:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/setNeedsDisplayAtScale:">– setNeedsDisplayAtScale:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/recursivelySetNeedsDisplayAtScale:">– recursivelySetNeedsDisplayAtScale:</a></code>
|
|
</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Touch handling" name="task_Touch handling"></a>
|
|
<h3 class="subsubtitle task-title">Touch handling</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/touchesBegan:withEvent:">– touchesBegan:withEvent:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/touchesMoved:withEvent:">– touchesMoved:withEvent:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/touchesEnded:withEvent:">– touchesEnded:withEvent:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/touchesCancelled:withEvent:">– touchesCancelled:withEvent:</a></code>
|
|
</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Managing Gesture Recognizers" name="task_Managing Gesture Recognizers"></a>
|
|
<h3 class="subsubtitle task-title">Managing Gesture Recognizers</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/gestureRecognizerShouldBegin:">– gestureRecognizerShouldBegin:</a></code>
|
|
</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Hit Testing" name="task_Hit Testing"></a>
|
|
<h3 class="subsubtitle task-title">Hit Testing</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/hitTest:withEvent:">– hitTest:withEvent:</a></code>
|
|
</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Observing node-related changes" name="task_Observing node-related changes"></a>
|
|
<h3 class="subsubtitle task-title">Observing node-related changes</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/willEnterHierarchy">– willEnterHierarchy</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/didExitHierarchy">– didExitHierarchy</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/reclaimMemory">– reclaimMemory</a></code>
|
|
</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Placeholders" name="task_Placeholders"></a>
|
|
<h3 class="subsubtitle task-title">Placeholders</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/placeholderImage">– placeholderImage</a></code>
|
|
</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Description" name="task_Description"></a>
|
|
<h3 class="subsubtitle task-title">Description</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/descriptionForRecursiveDescription">– descriptionForRecursiveDescription</a></code>
|
|
</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="section section-methods">
|
|
<a title="Properties" name="properties"></a>
|
|
<h2 class="subtitle subtitle-methods">Properties</h2>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/contentsScaleForDisplay" title="contentsScaleForDisplay"></a>
|
|
<h3 class="subsubtitle method-title">contentsScaleForDisplay</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>The scale factor to apply to the rendering.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readonly) CGFloat contentsScaleForDisplay</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Use setNeedsDisplayAtScale: to set a value and then after display, the display node will set the layer’s
|
|
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 layer, eg in drawParameters.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection see-also-section">
|
|
<h4 class="method-subtitle">See Also</h4>
|
|
<ul>
|
|
|
|
<li><code><p><a href="#//api/name/setNeedsDisplayAtScale:">- setNeedsDisplayAtScale:</a></p></code></li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/inHierarchy" title="inHierarchy"></a>
|
|
<h3 class="subsubtitle method-title">inHierarchy</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Whether the view or layer of this display node is currently in a window</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, assign, getter=isInHierarchy) BOOL inHierarchy</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="section section-methods">
|
|
<a title="Class Methods" name="class_methods"></a>
|
|
<h2 class="subtitle subtitle-methods">Class Methods</h2>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/displayWithParameters:isCancelled:" title="displayWithParameters:isCancelled:"></a>
|
|
<h3 class="subsubtitle method-title">displayWithParameters:isCancelled:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>@summary Delegate override to provide new layer contents as a UIImage.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>+ (UIImage *)displayWithParameters:(id)<em>parameters</em> isCancelled:(id)<em>isCancelledBlock</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>parameters</em></dt>
|
|
<dd><p>An object describing all of the properties you need to draw. Return this from
|
|
-drawParametersForAsyncLayer:</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>isCancelledBlock</em></dt>
|
|
<dd><p>Execute this block to check whether the current drawing operation has been cancelled to avoid
|
|
unnecessary work. A return value of YES means cancel drawing and return.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<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>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<div class="note"><p><strong>Note:</strong> Called on the display queue and/or main queue (MUST BE THREAD SAFE)</p></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/drawRect:withParameters:isCancelled:isRasterizing:" title="drawRect:withParameters:isCancelled:isRasterizing:"></a>
|
|
<h3 class="subsubtitle method-title">drawRect:withParameters:isCancelled:isRasterizing:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>@summary Delegate method to draw layer contents into a CGBitmapContext. The current UIGraphics context will be set
|
|
to an appropriate context.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>+ (void)drawRect:(id)<em>bounds</em> withParameters:(id)<em>parameters</em> isCancelled:(id)<em>isCancelledBlock</em> isRasterizing:(id)<em>isRasterizing</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>bounds</em></dt>
|
|
<dd><p>Region to draw in.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>parameters</em></dt>
|
|
<dd><p>An object describing all of the properties you need to draw. Return this from
|
|
-drawParametersForAsyncLayer:</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>isCancelledBlock</em></dt>
|
|
<dd><p>Execute this block to check whether the current drawing operation has been cancelled to avoid
|
|
unnecessary work. A return value of YES means cancel drawing and return.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>isRasterizing</em></dt>
|
|
<dd><p>YES if the layer is being rasterized into another layer, in which case drawRect: probably wants
|
|
to avoid doing things like filling its bounds with a zero-alpha color to clear the backing store.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<div class="note"><p><strong>Note:</strong> Called on the display queue and/or main queue (MUST BE THREAD SAFE)</p></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/viewClass" title="viewClass"></a>
|
|
<h3 class="subsubtitle method-title">viewClass</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>The view class to use when creating a new display node instance. Defaults to _ASDisplayView.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>+ (Class)viewClass</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>The view class to use when creating a new display node instance. Defaults to _ASDisplayView.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="section section-methods">
|
|
<a title="Instance Methods" name="instance_methods"></a>
|
|
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/calculateSizeThatFits:" title="calculateSizeThatFits:"></a>
|
|
<h3 class="subsubtitle method-title">calculateSizeThatFits:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Return the calculated size.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (CGSize)calculateSizeThatFits:(id)<em>constrainedSize</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>constrainedSize</em></dt>
|
|
<dd><p>The maximum size the receiver should fit in.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Subclasses that override should expect this method to be called on a non-main thread. The returned size
|
|
is cached by ASDisplayNode for quick access during -layout, via -calculatedSize. Other expensive work that needs to
|
|
be done before display can be performed here, and using ivars to cache any valuable intermediate results is
|
|
encouraged.</p><div class="note"><p><strong>Note:</strong> This method should not be called directly outside of ASDisplayNode; use -measure: or -calculatedSize instead.</p></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/descriptionForRecursiveDescription" title="descriptionForRecursiveDescription"></a>
|
|
<h3 class="subsubtitle method-title">descriptionForRecursiveDescription</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Return a description of the node</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (NSString *)descriptionForRecursiveDescription</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>The function that gets called for each display node in -recursiveDescription</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/didExitHierarchy" title="didExitHierarchy"></a>
|
|
<h3 class="subsubtitle method-title">didExitHierarchy</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Called after the view is removed from the window.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)didExitHierarchy</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/didLoad" title="didLoad"></a>
|
|
<h3 class="subsubtitle method-title">didLoad</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Called on the main thread immediately after self.view is created.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)didLoad</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>This is the best time to add gesture recognizers to the view.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/displayDidFinish" title="displayDidFinish"></a>
|
|
<h3 class="subsubtitle method-title">displayDidFinish</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Indicates that the receiver has finished displaying.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)displayDidFinish</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Subclasses may override this method to be notified when display (asynchronous or synchronous) has
|
|
completed.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/displayWillStart" title="displayWillStart"></a>
|
|
<h3 class="subsubtitle method-title">displayWillStart</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Indicates that the receiver is about to display.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)displayWillStart</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Subclasses may override this method to be notified when display (asynchronous or synchronous) is
|
|
about to begin.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/drawParametersForAsyncLayer:" title="drawParametersForAsyncLayer:"></a>
|
|
<h3 class="subsubtitle method-title">drawParametersForAsyncLayer:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Delegate override for drawParameters</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (NSObject *)drawParametersForAsyncLayer:(id)<em>layer</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>layer</em></dt>
|
|
<dd><p>The layer that will be drawn into.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<div class="note"><p><strong>Note:</strong> Called on the main thread only</p></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/gestureRecognizerShouldBegin:" title="gestureRecognizerShouldBegin:"></a>
|
|
<h3 class="subsubtitle method-title">gestureRecognizerShouldBegin:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Asks the node if a gesture recognizer should continue tracking touches.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (BOOL)gestureRecognizerShouldBegin:(id)<em>gestureRecognizer</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>gestureRecognizer</em></dt>
|
|
<dd><p>A gesture recognizer trying to recognize a gesture.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/hitTest:withEvent:" title="hitTest:withEvent:"></a>
|
|
<h3 class="subsubtitle method-title">hitTest:withEvent:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Returns the view that contains the point.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (UIView *)hitTest:(id)<em>point</em> withEvent:(id)<em>event</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>point</em></dt>
|
|
<dd><p>A point specified in the node’s local coordinate system (bounds).</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>event</em></dt>
|
|
<dd><p>The event that warranted a call to this method.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>Returns a UIView, not ASDisplayNode, for two reasons:
|
|
1) allows sending events to plain UIViews that don’t have attached nodes,
|
|
2) hitTest: is never called before the views are created.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Override to make this node respond differently to touches: (e.g. hide touches from subviews, send all
|
|
touches to certain subviews (hit area maximizing), etc.)</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/invalidateCalculatedSize" title="invalidateCalculatedSize"></a>
|
|
<h3 class="subsubtitle method-title">invalidateCalculatedSize</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Invalidate previously measured and cached size.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)invalidateCalculatedSize</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<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 contents of the node change in such a way as to require measuring it again.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/layout" title="layout"></a>
|
|
<h3 class="subsubtitle method-title">layout</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Called on the main thread by the view’s -layoutSubviews.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)layout</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Subclasses override this method to layout all subnodes or subviews.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/layoutDidFinish" title="layoutDidFinish"></a>
|
|
<h3 class="subsubtitle method-title">layoutDidFinish</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Called on the main thread by the view’s -layoutSubviews, after -layout.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)layoutDidFinish</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Gives a chance for subclasses to perform actions after the subclass and superclass have finished laying
|
|
out.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/placeholderImage" title="placeholderImage"></a>
|
|
<h3 class="subsubtitle method-title">placeholderImage</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Optionally provide an image to serve as the placeholder for the backing store while the contents are being
|
|
displayed.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (UIImage *)placeholderImage</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<div class="note"><p><strong>Note:</strong> Called on the display queue and/or main queue (MUST BE THREAD SAFE)</p></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/reclaimMemory" title="reclaimMemory"></a>
|
|
<h3 class="subsubtitle method-title">reclaimMemory</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Provides an opportunity to clear backing store and other memory-intensive intermediates, such as text layout managers
|
|
or downloaded content that can be written to a disk cache.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)reclaimMemory</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Called by -recursivelyReclaimMemory. Base class implements self.contents = nil, clearing any backing
|
|
store, for asynchronous regeneration when needed.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/recursivelySetNeedsDisplayAtScale:" title="recursivelySetNeedsDisplayAtScale:"></a>
|
|
<h3 class="subsubtitle method-title">recursivelySetNeedsDisplayAtScale:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Recursively calls setNeedsDisplayAtScale: on subnodes.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)recursivelySetNeedsDisplayAtScale:(id)<em>contentsScale</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>contentsScale</em></dt>
|
|
<dd><p>The scale at which the receiver’s subnode hierarchy should be drawn.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Subclasses may override this if they require modifying the scale set on their child nodes.</p><div class="note"><p><strong>Note:</strong> Only the node tree is walked, not the view or layer trees.</p></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection see-also-section">
|
|
<h4 class="method-subtitle">See Also</h4>
|
|
<ul>
|
|
|
|
<li><code><p><a href="#//api/name/setNeedsDisplayAtScale:">- setNeedsDisplayAtScale:</a></p></code></li>
|
|
|
|
<li><code><p><a href="#//api/name/contentsScaleForDisplay">@property contentsScaleForDisplay</a></p></code></li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/setNeedsDisplayAtScale:" title="setNeedsDisplayAtScale:"></a>
|
|
<h3 class="subsubtitle method-title">setNeedsDisplayAtScale:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Marks the receiver’s bounds as needing to be redrawn, with a scale value.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)setNeedsDisplayAtScale:(id)<em>contentsScale</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>contentsScale</em></dt>
|
|
<dd><p>The scale at which the receiver should be drawn.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<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.
|
|
-setNeedsDisplay is also available to trigger display without changing contentsScaleForDisplay.</p></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection see-also-section">
|
|
<h4 class="method-subtitle">See Also</h4>
|
|
<ul>
|
|
|
|
<li><code><p>-setNeedsDisplay, <a href="#//api/name/contentsScaleForDisplay">@property contentsScaleForDisplay</a></p></code></li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/subnodeDisplayDidFinish:" title="subnodeDisplayDidFinish:"></a>
|
|
<h3 class="subsubtitle method-title">subnodeDisplayDidFinish:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Indicates that the receiver is finished displaying its subnodes. This method is not called if there are
|
|
no subnodes present.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)subnodeDisplayDidFinish:(id)<em>subnode</em></code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Subclasses may override this method to be notified when subnode display (asynchronous or synchronous) is
|
|
about to begin.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/subnodeDisplayWillStart:" title="subnodeDisplayWillStart:"></a>
|
|
<h3 class="subsubtitle method-title">subnodeDisplayWillStart:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Indicates that the receiver is about to display its subnodes. This method is not called if there are no
|
|
subnodes present.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)subnodeDisplayWillStart:(id)<em>subnode</em></code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Subclasses may override this method to be notified when subnode display (asynchronous or synchronous) is
|
|
about to begin.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/touchesBegan:withEvent:" title="touchesBegan:withEvent:"></a>
|
|
<h3 class="subsubtitle method-title">touchesBegan:withEvent:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Tells the node when touches began in its view.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)touchesBegan:(id)<em>touches</em> withEvent:(id)<em>event</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>touches</em></dt>
|
|
<dd><p>A set of UITouch instances.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>event</em></dt>
|
|
<dd><p>A UIEvent associated with the touch.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/touchesCancelled:withEvent:" title="touchesCancelled:withEvent:"></a>
|
|
<h3 class="subsubtitle method-title">touchesCancelled:withEvent:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Tells the node when touches was cancelled in its view.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)touchesCancelled:(id)<em>touches</em> withEvent:(id)<em>event</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>touches</em></dt>
|
|
<dd><p>A set of UITouch instances.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>event</em></dt>
|
|
<dd><p>A UIEvent associated with the touch.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/touchesEnded:withEvent:" title="touchesEnded:withEvent:"></a>
|
|
<h3 class="subsubtitle method-title">touchesEnded:withEvent:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Tells the node when touches ended in its view.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)touchesEnded:(id)<em>touches</em> withEvent:(id)<em>event</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>touches</em></dt>
|
|
<dd><p>A set of UITouch instances.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>event</em></dt>
|
|
<dd><p>A UIEvent associated with the touch.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/touchesMoved:withEvent:" title="touchesMoved:withEvent:"></a>
|
|
<h3 class="subsubtitle method-title">touchesMoved:withEvent:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Tells the node when touches moved in its view.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)touchesMoved:(id)<em>touches</em> withEvent:(id)<em>event</em></code></div>
|
|
|
|
|
|
|
|
<div class="method-subsection arguments-section parameters">
|
|
<h4 class="method-subtitle parameter-title">Parameters</h4>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>touches</em></dt>
|
|
<dd><p>A set of UITouch instances.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>event</em></dt>
|
|
<dd><p>A UIEvent associated with the touch.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/willEnterHierarchy" title="willEnterHierarchy"></a>
|
|
<h3 class="subsubtitle method-title">willEnterHierarchy</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Called just before the view is added to a superview.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)willEnterHierarchy</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode+Subclasses.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="main-navigation navigation-bottom">
|
|
<ul>
|
|
<li><a href="../index.html">Index</a></li>
|
|
<li><a href="../hierarchy.html">Hierarchy</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="footer">
|
|
<hr />
|
|
<div class="footer-copyright">
|
|
<p><span class="copyright">© 2015 Facebook. All rights reserved. (Last updated: 2015-01-05)</span><br />
|
|
|
|
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 963)</a>.</span></p>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
<script type="text/javascript">
|
|
function jumpToChange()
|
|
{
|
|
window.location.hash = this.options[this.selectedIndex].value;
|
|
}
|
|
|
|
function toggleTOC()
|
|
{
|
|
var contents = document.getElementById('contents');
|
|
var tocContainer = document.getElementById('tocContainer');
|
|
|
|
if (this.getAttribute('class') == 'open')
|
|
{
|
|
this.setAttribute('class', '');
|
|
contents.setAttribute('class', '');
|
|
tocContainer.setAttribute('class', '');
|
|
|
|
window.name = "hideTOC";
|
|
}
|
|
else
|
|
{
|
|
this.setAttribute('class', 'open');
|
|
contents.setAttribute('class', 'isShowingTOC');
|
|
tocContainer.setAttribute('class', 'isShowingTOC');
|
|
|
|
window.name = "";
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function toggleTOCEntryChildren(e)
|
|
{
|
|
e.stopPropagation();
|
|
var currentClass = this.getAttribute('class');
|
|
if (currentClass == 'children') {
|
|
this.setAttribute('class', 'children open');
|
|
}
|
|
else if (currentClass == 'children open') {
|
|
this.setAttribute('class', 'children');
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function tocEntryClick(e)
|
|
{
|
|
e.stopPropagation();
|
|
return true;
|
|
}
|
|
|
|
function init()
|
|
{
|
|
var selectElement = document.getElementById('jumpTo');
|
|
selectElement.addEventListener('change', jumpToChange, false);
|
|
|
|
var tocButton = document.getElementById('table_of_contents');
|
|
tocButton.addEventListener('click', toggleTOC, false);
|
|
|
|
var taskTreeItem = document.getElementById('task_treeitem');
|
|
if (taskTreeItem.getElementsByTagName('li').length > 0)
|
|
{
|
|
taskTreeItem.setAttribute('class', 'children');
|
|
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
|
|
}
|
|
|
|
var tocList = document.getElementById('toc');
|
|
|
|
var tocEntries = tocList.getElementsByTagName('li');
|
|
for (var i = 0; i < tocEntries.length; i++) {
|
|
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
|
|
}
|
|
|
|
var tocLinks = tocList.getElementsByTagName('a');
|
|
for (var i = 0; i < tocLinks.length; i++) {
|
|
tocLinks[i].addEventListener('click', tocEntryClick, false);
|
|
}
|
|
|
|
if (window.name == "hideTOC") {
|
|
toggleTOC.call(tocButton);
|
|
}
|
|
}
|
|
|
|
window.onload = init;
|
|
|
|
// If showing in Xcode, hide the TOC and Header
|
|
if (navigator.userAgent.match(/xcode/i)) {
|
|
document.getElementById("contents").className = "hideInXcode"
|
|
document.getElementById("tocContainer").className = "hideInXcode"
|
|
document.getElementById("top_header").className = "hideInXcode"
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html> |