mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-04-18 22:28:57 +08:00
3565 lines
98 KiB
HTML
3565 lines
98 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
|
|
<title>ASDisplayNode Class 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 Class 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/backgroundColor"> backgroundColor</option>
|
|
|
|
<option value="//api/name/calculatedSize"> calculatedSize</option>
|
|
|
|
<option value="//api/name/constrainedSizeForCalculatedSize"> constrainedSizeForCalculatedSize</option>
|
|
|
|
<option value="//api/name/contentMode"> contentMode</option>
|
|
|
|
<option value="//api/name/contentsScaleForDisplay"> contentsScaleForDisplay</option>
|
|
|
|
<option value="//api/name/displaysAsynchronously"> displaysAsynchronously</option>
|
|
|
|
<option value="//api/name/hitTestSlop"> hitTestSlop</option>
|
|
|
|
<option value="//api/name/inWindow"> inWindow</option>
|
|
|
|
<option value="//api/name/layer"> layer</option>
|
|
|
|
<option value="//api/name/layerBacked"> layerBacked</option>
|
|
|
|
<option value="//api/name/nodeLoaded"> nodeLoaded</option>
|
|
|
|
<option value="//api/name/preventOrCancelDisplay"> preventOrCancelDisplay</option>
|
|
|
|
<option value="//api/name/shouldRasterizeDescendants"> shouldRasterizeDescendants</option>
|
|
|
|
<option value="//api/name/subnodes"> subnodes</option>
|
|
|
|
<option value="//api/name/supernode"> supernode</option>
|
|
|
|
<option value="//api/name/synchronous"> synchronous</option>
|
|
|
|
<option value="//api/name/view"> view</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/addSubnode:"> - addSubnode:</option>
|
|
|
|
<option value="//api/name/calculateSizeThatFits:"> - calculateSizeThatFits:</option>
|
|
|
|
<option value="//api/name/convertPoint:fromNode:"> - convertPoint:fromNode:</option>
|
|
|
|
<option value="//api/name/convertPoint:toNode:"> - convertPoint:toNode:</option>
|
|
|
|
<option value="//api/name/convertRect:fromNode:"> - convertRect:fromNode:</option>
|
|
|
|
<option value="//api/name/convertRect:toNode:"> - convertRect:toNode:</option>
|
|
|
|
<option value="//api/name/descriptionForRecursiveDescription"> - descriptionForRecursiveDescription</option>
|
|
|
|
<option value="//api/name/didLoad"> - didLoad</option>
|
|
|
|
<option value="//api/name/displayDidFinish"> - displayDidFinish</option>
|
|
|
|
<option value="//api/name/displayImmediately"> - displayImmediately</option>
|
|
|
|
<option value="//api/name/displayNodeRecursiveDescription"> - displayNodeRecursiveDescription</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/init"> - init</option>
|
|
|
|
<option value="//api/name/initWithLayerClass:"> - initWithLayerClass:</option>
|
|
|
|
<option value="//api/name/initWithViewClass:"> - initWithViewClass:</option>
|
|
|
|
<option value="//api/name/insertSubnode:aboveSubnode:"> - insertSubnode:aboveSubnode:</option>
|
|
|
|
<option value="//api/name/insertSubnode:atIndex:"> - insertSubnode:atIndex:</option>
|
|
|
|
<option value="//api/name/insertSubnode:belowSubnode:"> - insertSubnode:belowSubnode:</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/measure:"> - measure:</option>
|
|
|
|
<option value="//api/name/pointInside:withEvent:"> - pointInside:withEvent:</option>
|
|
|
|
<option value="//api/name/recursiveSetPreventOrCancelDisplay:"> - recursiveSetPreventOrCancelDisplay:</option>
|
|
|
|
<option value="//api/name/recursivelySetNeedsDisplayAtScale:"> - recursivelySetNeedsDisplayAtScale:</option>
|
|
|
|
<option value="//api/name/removeFromSupernode"> - removeFromSupernode</option>
|
|
|
|
<option value="//api/name/replaceSubnode:withSubnode:"> - replaceSubnode:withSubnode:</option>
|
|
|
|
<option value="//api/name/setNeedsDisplayAtScale:"> - setNeedsDisplayAtScale:</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>
|
|
|
|
|
|
|
|
</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_Initializing a node object">Initializing a node object</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_Getting view and layer">Getting view and layer</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Managing dimensions">Managing dimensions</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Managing the nodes hierarchy">Managing the nodes hierarchy</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Drawing and Updating the View">Drawing and Updating the View</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_Converting Between View Coordinate Systems">Converting Between View Coordinate Systems</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>
|
|
|
|
|
|
|
|
|
|
|
|
<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/backgroundColor">backgroundColor</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/calculatedSize">calculatedSize</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/constrainedSizeForCalculatedSize">constrainedSizeForCalculatedSize</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/contentMode">contentMode</a></span></li>
|
|
|
|
<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/displaysAsynchronously">displaysAsynchronously</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/hitTestSlop">hitTestSlop</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/inWindow">inWindow</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/layer">layer</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/layerBacked">layerBacked</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/nodeLoaded">nodeLoaded</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/preventOrCancelDisplay">preventOrCancelDisplay</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/shouldRasterizeDescendants">shouldRasterizeDescendants</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/subnodes">subnodes</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/supernode">supernode</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/synchronous">synchronous</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/view">view</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/addSubnode:">addSubnode:</a></span></li>
|
|
|
|
<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/convertPoint:fromNode:">convertPoint:fromNode:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/convertPoint:toNode:">convertPoint:toNode:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/convertRect:fromNode:">convertRect:fromNode:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/convertRect:toNode:">convertRect:toNode:</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/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/displayImmediately">displayImmediately</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/displayNodeRecursiveDescription">displayNodeRecursiveDescription</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/init">init</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initWithLayerClass:">initWithLayerClass:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initWithViewClass:">initWithViewClass:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/insertSubnode:aboveSubnode:">insertSubnode:aboveSubnode:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/insertSubnode:atIndex:">insertSubnode:atIndex:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/insertSubnode:belowSubnode:">insertSubnode:belowSubnode:</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/measure:">measure:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/pointInside:withEvent:">pointInside:withEvent:</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/recursiveSetPreventOrCancelDisplay:">recursiveSetPreventOrCancelDisplay:</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/removeFromSupernode">removeFromSupernode</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/replaceSubnode:withSubnode:">replaceSubnode:withSubnode:</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/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>
|
|
|
|
</ul></li>
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
<article>
|
|
<div id="contents" class="isShowingTOC" role="main">
|
|
<a title="ASDisplayNode Class 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 Class Reference</h1>
|
|
</div>
|
|
</div>
|
|
<div id="container">
|
|
|
|
<div class="section section-specification"><table cellspacing="0"><tbody>
|
|
<tr>
|
|
<td class="specification-title">Inherits from</td>
|
|
<td class="specification-value">ASDealloc2MainObject</td>
|
|
</tr><tr>
|
|
<td class="specification-title">Declared in</td>
|
|
<td class="specification-value">ASDisplayNode.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>An <code>ASDisplayNode</code> is an abstraction over <code>UIView</code> and <code>CALayer</code> that allows you to perform calculations about a <a href="#//api/name/view">view</a>
|
|
hierarchy off the main thread, and could do rendering off the main thread as well.</p>
|
|
|
|
<p>The node API is designed to be as similar as possible to <code>UIView</code>. See the README for examples.</p>
|
|
|
|
<h2>Subclassing</h2>
|
|
|
|
<p><code>ASDisplayNode</code> can be subclassed to create a new UI element. The subclass header <code>ASDisplayNode+Subclasses</code> provides
|
|
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>
|
|
|
|
<h2>UIView bridge</h2>
|
|
|
|
<p>ASDisplayNode provides thread-safe access to most of UIView and CALayer properties and methods, traditionally unsafe.</p>
|
|
|
|
<p>Using them will not cause the actual view/<a href="#//api/name/layer">layer</a> to be created, and will be applied when it is created (when the <a href="#//api/name/view">view</a>
|
|
or <a href="#//api/name/layer">layer</a> property is accessed).</p>
|
|
|
|
<p>After the <a href="#//api/name/view">view</a> is created, the properties pass through to the <a href="#//api/name/view">view</a> directly as if called on the main thread.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="section section-tasks">
|
|
<a title="Tasks" name="tasks"></a>
|
|
<h2 class="subtitle subtitle-tasks">Tasks</h2>
|
|
|
|
|
|
<a title="Initializing a node object" name="task_Initializing a node object"></a>
|
|
<h3 class="subsubtitle task-title">Initializing a node object</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/init">– init</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/initWithViewClass:">– initWithViewClass:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/initWithLayerClass:">– initWithLayerClass:</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/synchronous"> synchronous</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Getting view and layer" name="task_Getting view and layer"></a>
|
|
<h3 class="subsubtitle task-title">Getting view and layer</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/view"> view</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/nodeLoaded"> nodeLoaded</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/layerBacked"> layerBacked</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/layer"> layer</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Managing dimensions" name="task_Managing dimensions"></a>
|
|
<h3 class="subsubtitle task-title">Managing dimensions</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/measure:">– measure:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/calculatedSize"> calculatedSize</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/constrainedSizeForCalculatedSize"> constrainedSizeForCalculatedSize</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Managing the nodes hierarchy" name="task_Managing the nodes hierarchy"></a>
|
|
<h3 class="subsubtitle task-title">Managing the nodes hierarchy</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/addSubnode:">– addSubnode:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/insertSubnode:belowSubnode:">– insertSubnode:belowSubnode:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/insertSubnode:aboveSubnode:">– insertSubnode:aboveSubnode:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/insertSubnode:atIndex:">– insertSubnode:atIndex:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/replaceSubnode:withSubnode:">– replaceSubnode:withSubnode:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/removeFromSupernode">– removeFromSupernode</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/subnodes"> subnodes</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/supernode"> supernode</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Drawing and Updating the View" name="task_Drawing and Updating the View"></a>
|
|
<h3 class="subsubtitle task-title">Drawing and Updating the View</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/displaysAsynchronously"> displaysAsynchronously</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/shouldRasterizeDescendants"> shouldRasterizeDescendants</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/displayImmediately">– displayImmediately</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/preventOrCancelDisplay"> preventOrCancelDisplay</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/recursiveSetPreventOrCancelDisplay:">– recursiveSetPreventOrCancelDisplay:</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/hitTestSlop"> hitTestSlop</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/pointInside:withEvent:">– pointInside:withEvent:</a></code>
|
|
</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
<a title="Converting Between View Coordinate Systems" name="task_Converting Between View Coordinate Systems"></a>
|
|
<h3 class="subsubtitle task-title">Converting Between View Coordinate Systems</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/convertPoint:toNode:">– convertPoint:toNode:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/convertPoint:fromNode:">– convertPoint:fromNode:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/convertRect:toNode:">– convertRect:toNode:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/convertRect:fromNode:">– convertRect:fromNode:</a></code>
|
|
</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>
|
|
|
|
|
|
<a title="ASDisplayNodeSubclasses Methods" name="task_ASDisplayNodeSubclasses Methods"></a>
|
|
<h3 class="subsubtitle task-title">ASDisplayNodeSubclasses Methods</h3>
|
|
|
|
<ul class="task-list">
|
|
<li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/viewClass">+ viewClass</a></code>
|
|
</span>
|
|
|
|
|
|
</li><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/inWindow"> inWindow</a></code>
|
|
</span>
|
|
<span class="task-item-suffix">property</span>
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/didLoad">– didLoad</a></code>
|
|
</span>
|
|
|
|
|
|
</li><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><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><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/displayDidFinish">– displayDidFinish</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><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><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/gestureRecognizerShouldBegin:">– gestureRecognizerShouldBegin:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><li>
|
|
<span class="tooltip">
|
|
<code><a href="#//api/name/hitTest:withEvent:">– hitTest:withEvent:</a></code>
|
|
</span>
|
|
|
|
|
|
</li><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/backgroundColor" title="backgroundColor"></a>
|
|
<h3 class="subsubtitle method-title">backgroundColor</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>The node view’s background color.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (atomic, retain) UIColor *backgroundColor</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>In contrast to UIView, setting a transparent color will not set opaque = NO.
|
|
This only affects nodes that implement +drawRect like <a href="../Classes/ASTextNode.html">ASTextNode</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/calculatedSize" title="calculatedSize"></a>
|
|
<h3 class="subsubtitle method-title">calculatedSize</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Return the calculated size.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, assign) CGSize calculatedSize</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>Size already calculated by <a href="#//api/name/calculateSizeThatFits:">calculateSizeThatFits:</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Ideal for use by subclasses in <a href="#//api/name/layout">layout</a>, having already prompted their <a href="#//api/name/subnodes">subnodes</a> to calculate their size by
|
|
calling <a href="#//api/name/measure:">measure:</a> on them in <a href="#//api/name/calculateSizeThatFits:">calculateSizeThatFits:</a>.</p><div class="warning"><p><strong>Warning:</strong> Subclasses must not override this; it returns the last cached size calculated and is never expensive.</p></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/constrainedSizeForCalculatedSize" title="constrainedSizeForCalculatedSize"></a>
|
|
<h3 class="subsubtitle method-title">constrainedSizeForCalculatedSize</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Return the constrained size used for calculating size.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, assign) CGSize constrainedSizeForCalculatedSize</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>The constrained size used by <a href="#//api/name/calculateSizeThatFits:">calculateSizeThatFits:</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/contentMode" title="contentMode"></a>
|
|
<h3 class="subsubtitle method-title">contentMode</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>A flag used to determine how a node lays out its content when its bounds change.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (atomic, assign) UIViewContentMode contentMode</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>This is like UIView’s contentMode property, but better. We do our own mapping to <a href="#//api/name/layer">layer</a>.contentsGravity in
|
|
_ASDisplayView. You can set needsDisplayOnBoundsChange independently.
|
|
Thus, UIViewContentModeRedraw is not allowed; use needsDisplayOnBoundsChange = YES instead, and pick an appropriate
|
|
contentMode for your content while it’s being re-rendered.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<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 <a href="#//api/name/setNeedsDisplayAtScale:">setNeedsDisplayAtScale:</a> 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 <a href="#//api/name/layer">layer</a>, 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/displaysAsynchronously" title="displaysAsynchronously"></a>
|
|
<h3 class="subsubtitle method-title">displaysAsynchronously</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Whether this node’s <a href="#//api/name/view">view</a> performs a<a href="#//api/name/synchronous">synchronous</a> rendering.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL displaysAsynchronously</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>Defaults to YES, except for <a href="#//api/name/synchronous">synchronous</a> views (ie, those created with <a href="#//api/name/initWithViewClass:">initWithViewClass:</a> /
|
|
<a href="#//api/name/initWithLayerClass:">initWithLayerClass:</a>), which are always NO.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>If this flag is set, then the node will participate in the current asyncdisplaykit_async_transaction and
|
|
do its rendering on the displayQueue instead of the main thread.</p>
|
|
|
|
<p>A<a href="#//api/name/synchronous">synchronous</a> rendering proceeds as follows:</p>
|
|
|
|
<p>When the <a href="#//api/name/view">view</a> is initially added to the hierarchy, it has -needsDisplay true.
|
|
After <a href="#//api/name/layout">layout</a>, Core Animation will call -display on the _ASDisplayLayer
|
|
-display enqueues a rendering operation on the displayQueue
|
|
When the render block executes, it calls the delegate display method (-drawRect:… or -display)
|
|
The delegate provides <a href="#//api/name/contents">contents</a> via this method and an operation is added to the asyncdisplaykit_async_transaction
|
|
Once all rendering is complete for the current asyncdisplaykit_async_transaction,
|
|
the completion for the block sets the <a href="#//api/name/contents">contents</a> on all of the layers in the same <a href="#//api/name/frame">frame</a></p>
|
|
|
|
<p>If a<a href="#//api/name/synchronous">synchronous</a> rendering is disabled:</p>
|
|
|
|
<p>When the <a href="#//api/name/view">view</a> is initially added to the hierarchy, it has -needsDisplay true.
|
|
After <a href="#//api/name/layout">layout</a>, Core Animation will call -display on the _ASDisplayLayer
|
|
-display calls delegate display method (-drawRect:… or -display) immediately
|
|
-display sets the layer contents immediately with the result</p>
|
|
|
|
<p>Note: this has nothing to do with [CALayer drawsAsynchronously].</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/hitTestSlop" title="hitTestSlop"></a>
|
|
<h3 class="subsubtitle method-title">hitTestSlop</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Bounds insets for hit testing.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) UIEdgeInsets hitTestSlop</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>When set to a non-zero inset, increases the <a href="#//api/name/bounds">bounds</a> for hit testing to make it easier to tap or perform
|
|
gestures on this node. Default is UIEdgeInsetsZero.</p>
|
|
|
|
<p>This affects the default implementation of -hitTest and -pointInside, so subclasses should call super if you override
|
|
it and want hitTestSlop applied.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/inWindow" title="inWindow"></a>
|
|
<h3 class="subsubtitle method-title">inWindow</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Whether the <a href="#//api/name/view">view</a> or <a href="#//api/name/layer">layer</a> of this display node is currently in a window</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, assign, getter=isInWindow) BOOL inWindow</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/layer" title="layer"></a>
|
|
<h3 class="subsubtitle method-title">layer</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Returns a layer.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, retain) CALayer *layer</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>The layer property is lazily initialized, similar to the <a href="#//api/name/view">view</a> property.
|
|
To go the other direction, use ASLayerToDisplayNode() in ASDisplayNodeExtras.h.</p><div class="warning"><p><strong>Warning:</strong> The first access to it must be on the main thread, and should only be used on the main thread thereafter as
|
|
well.</p></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/layerBacked" title="layerBacked"></a>
|
|
<h3 class="subsubtitle method-title">layerBacked</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Returns whether the node rely on a <a href="#//api/name/layer">layer</a> instead of a <a href="#//api/name/view">view</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, getter=isLayerBacked) BOOL layerBacked</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>YES if the node rely on a <a href="#//api/name/layer">layer</a>, NO otherwise.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/nodeLoaded" title="nodeLoaded"></a>
|
|
<h3 class="subsubtitle method-title">nodeLoaded</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Returns whether a node’s backing <a href="#//api/name/view">view</a> or <a href="#//api/name/layer">layer</a> is loaded.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (atomic, readonly, assign, getter=isNodeLoaded) BOOL nodeLoaded</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>YES if a <a href="#//api/name/view">view</a> is loaded, or if <a href="#//api/name/layerBacked">isLayerBacked</a> is YES and <a href="#//api/name/layer">layer</a> is not nil; NO otherwise.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/preventOrCancelDisplay" title="preventOrCancelDisplay"></a>
|
|
<h3 class="subsubtitle method-title">preventOrCancelDisplay</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Prevent the node’s <a href="#//api/name/layer">layer</a> from displaying.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL preventOrCancelDisplay</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>A subclass may check this flag during -display or -drawInContext: to cancel a display that is already in
|
|
progress.</p>
|
|
|
|
<p>Defaults to NO. Does not control display for any child or descendant nodes; for that, use
|
|
<a href="#//api/name/recursiveSetPreventOrCancelDisplay:">recursiveSetPreventOrCancelDisplay:</a>.</p>
|
|
|
|
<p>If a <a href="#//api/name/setNeedsDisplay">setNeedsDisplay</a> occurs while preventOrCancelDisplay is YES, and preventOrCancelDisplay is set to NO, then the
|
|
<a href="#//api/name/layer">layer</a> will be automatically displayed.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/shouldRasterizeDescendants" title="shouldRasterizeDescendants"></a>
|
|
<h3 class="subsubtitle method-title">shouldRasterizeDescendants</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Whether to draw all descendant nodes' layers/views into this node’s layer/view’s backing store.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) BOOL shouldRasterizeDescendants</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/subnodes" title="subnodes"></a>
|
|
<h3 class="subsubtitle method-title">subnodes</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>The receiver’s immediate subnodes.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, retain) NSArray *subnodes</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/supernode" title="supernode"></a>
|
|
<h3 class="subsubtitle method-title">supernode</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>The receiver’s supernode.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, weak) ASDisplayNode *supernode</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/synchronous" title="synchronous"></a>
|
|
<h3 class="subsubtitle method-title">synchronous</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Returns whether the <a href="#//api/name/view">view</a> is synchronous.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, assign, getter=isSynchronous) BOOL synchronous</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>NO if the node wraps a _ASDisplayView, YES otherwise.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/view" title="view"></a>
|
|
<h3 class="subsubtitle method-title">view</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Returns a view.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, retain) UIView *view</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>The view property is lazily initialized, similar to UIViewController.
|
|
To go the other direction, use ASViewToDisplayNode() in ASDisplayNodeExtras.h.</p><div class="warning"><p><strong>Warning:</strong> The first access to it must be on the main thread, and should only be used on the main thread thereafter as
|
|
well.</p></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.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 <a href="#//api/name/layer">layer</a> 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
|
|
<a href="#//api/name/drawParametersForAsyncLayer:">drawParametersForAsyncLayer:</a></p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>isCancelled</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 <a href="#//api/name/layer">layer</a> 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>parameters</em></dt>
|
|
<dd><p>An object describing all of the properties you need to draw. Return this from
|
|
<a href="#//api/name/drawParametersForAsyncLayer:">drawParametersForAsyncLayer:</a></p></dd>
|
|
</dl>
|
|
|
|
<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 bounds with a zero-alpha color to clear the backing store.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>isCancelled</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 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 <a href="#//api/name/view">view</a> 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 <a href="#//api/name/view">view</a> 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/addSubnode:" title="addSubnode:"></a>
|
|
<h3 class="subsubtitle method-title">addSubnode:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Add a node as a subnode to this node.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)addSubnode:(id)<em>subnode</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>subnode</em></dt>
|
|
<dd><p>The node to be added.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>The subnode’s <a href="#//api/name/view">view</a> will automatically be added to this node’s <a href="#//api/name/view">view</a>, lazily if the views are not created
|
|
yet.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<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 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 <a href="#//api/name/layout">layout</a>, via <a href="#//api/name/calculatedSize">calculatedSize</a>. 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 <a href="#//api/name/measure:">measure:</a> or <a href="#//api/name/calculatedSize">calculatedSize</a> 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/convertPoint:fromNode:" title="convertPoint:fromNode:"></a>
|
|
<h3 class="subsubtitle method-title">convertPoint:fromNode:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Converts a point from the coordinate system of a given node to that of the receiver.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (CGPoint)convertPoint:(id)<em>point</em> fromNode:(id)<em>node</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 local coordinate system (<a href="#//api/name/bounds">bounds</a>) of node.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>node</em></dt>
|
|
<dd><p>The node with point in its coordinate system.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>The point converted to the local coordinate system (<a href="#//api/name/bounds">bounds</a>) of the receiver.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/convertPoint:toNode:" title="convertPoint:toNode:"></a>
|
|
<h3 class="subsubtitle method-title">convertPoint:toNode:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Converts a point from the receiver’s coordinate system to that of the specified node.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (CGPoint)convertPoint:(id)<em>point</em> toNode:(id)<em>node</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 local coordinate system (<a href="#//api/name/bounds">bounds</a>) of the receiver.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>node</em></dt>
|
|
<dd><p>The node into whose coordinate system point is to be converted.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>The point converted to the coordinate system of node.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/convertRect:fromNode:" title="convertRect:fromNode:"></a>
|
|
<h3 class="subsubtitle method-title">convertRect:fromNode:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Converts a rectangle from the coordinate system of another node to that of the receiver.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (CGRect)convertRect:(id)<em>rect</em> fromNode:(id)<em>node</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>rect</em></dt>
|
|
<dd><p>A rectangle specified in the local coordinate system (<a href="#//api/name/bounds">bounds</a>) of node.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>node</em></dt>
|
|
<dd><p>The node with rect in its coordinate system.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>The converted rectangle.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/convertRect:toNode:" title="convertRect:toNode:"></a>
|
|
<h3 class="subsubtitle method-title">convertRect:toNode:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Converts a rectangle from the receiver’s coordinate system to that of another <a href="#//api/name/view">view</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (CGRect)convertRect:(id)<em>rect</em> toNode:(id)<em>node</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>rect</em></dt>
|
|
<dd><p>A rectangle specified in the local coordinate system (<a href="#//api/name/bounds">bounds</a>) of the receiver.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>node</em></dt>
|
|
<dd><p>The node that is the target of the conversion operation.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>The converted rectangle.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.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/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.<a href="#//api/name/view">view</a> 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 <a href="#//api/name/view">view</a>.</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 (a<a href="#//api/name/synchronous">synchronous</a> or <a href="#//api/name/synchronous">synchronous</a>) 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/displayImmediately" title="displayImmediately"></a>
|
|
<h3 class="subsubtitle method-title">displayImmediately</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Display the node’s view/<a href="#//api/name/layer">layer</a> immediately on the current thread, bypassing the background thread rendering.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)displayImmediately</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/displayNodeRecursiveDescription" title="displayNodeRecursiveDescription"></a>
|
|
<h3 class="subsubtitle method-title">displayNodeRecursiveDescription</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Return a description of the node hierarchy</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (NSString *)displayNodeRecursiveDescription</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>For debugging: (lldb) po [node displayNodeRecursiveDescription]</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.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 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 <a href="#//api/name/view">view</a> 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/init" title="init"></a>
|
|
<h3 class="subsubtitle method-title">init</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Designated initializer.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (id)init</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>An ASDisplayNode instance whose <a href="#//api/name/view">view</a> will be a subclass that enables a<a href="#//api/name/synchronous">synchronous</a> rendering, and passes
|
|
through <a href="#//api/name/layout">layout</a> and touch handling methods.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/initWithLayerClass:" title="initWithLayerClass:"></a>
|
|
<h3 class="subsubtitle method-title">initWithLayerClass:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Alternative initializer with a <a href="#//api/name/layer">layer</a> class.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (id)initWithLayerClass:(id)<em>layerClass</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>layerClass</em></dt>
|
|
<dd><p>Any CALayer subclass, such as CATransformLayer.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>An ASDisplayNode instance whose <a href="#//api/name/layer">layer</a> will be of class layerClass.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>If layerClass is not a subclass of _ASDisplayLayer, it will still render synchronously and <a href="#//api/name/layout">layout</a> on the
|
|
node will not be called.
|
|
The <a href="#//api/name/layer">layer</a> instance will be created with alloc/<a href="#//api/name/init">init</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/initWithViewClass:" title="initWithViewClass:"></a>
|
|
<h3 class="subsubtitle method-title">initWithViewClass:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Alternative initializer with a <a href="#//api/name/view">view</a> class.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (id)initWithViewClass:(id)<em>viewClass</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>viewClass</em></dt>
|
|
<dd><p>Any UIView subclass, such as UIScrollView.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>An ASDisplayNode instance whose <a href="#//api/name/view">view</a> will be of class <a href="#//api/name/viewClass">viewClass</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>If <a href="#//api/name/viewClass">viewClass</a> is not a subclass of _ASDisplayView, it will still render synchronously and <a href="#//api/name/layout">layout</a> and
|
|
touch handling methods on the node will not be called.
|
|
The <a href="#//api/name/view">view</a> instance will be created with alloc/<a href="#//api/name/init">init</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/insertSubnode:aboveSubnode:" title="insertSubnode:aboveSubnode:"></a>
|
|
<h3 class="subsubtitle method-title">insertSubnode:aboveSubnode:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Insert a subnode after a given subnode in the list.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)insertSubnode:(id)<em>subnode</em> aboveSubnode:(id)<em>above</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>subnode</em></dt>
|
|
<dd><p>The node to insert below another node.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>above</em></dt>
|
|
<dd><p>The sibling node that will be behind the inserted node.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>If the views are loaded, the subnode’s <a href="#//api/name/view">view</a> will be inserted above the given node’s <a href="#//api/name/view">view</a> in the hierarchy
|
|
even if there are other non-displaynode views.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/insertSubnode:atIndex:" title="insertSubnode:atIndex:"></a>
|
|
<h3 class="subsubtitle method-title">insertSubnode:atIndex:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Insert a subnode at a given index in <a href="#//api/name/subnodes">subnodes</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)insertSubnode:(id)<em>subnode</em> atIndex:(id)<em>idx</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>subnode</em></dt>
|
|
<dd><p>The node to insert.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>idx</em></dt>
|
|
<dd><p>The index in the array of the <a href="#//api/name/subnodes">subnodes</a> property at which to insert the node. Subnodes indices start at 0
|
|
and cannot be greater than the number of <a href="#//api/name/subnodes">subnodes</a>.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>If this node’s <a href="#//api/name/view">view</a> is loaded, ASDisplayNode insert the subnode’s <a href="#//api/name/view">view</a> after the subnode at index - 1’s
|
|
<a href="#//api/name/view">view</a> even if there are other non-displaynode views.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/insertSubnode:belowSubnode:" title="insertSubnode:belowSubnode:"></a>
|
|
<h3 class="subsubtitle method-title">insertSubnode:belowSubnode:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Insert a subnode before a given subnode in the list.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)insertSubnode:(id)<em>subnode</em> belowSubnode:(id)<em>below</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>subnode</em></dt>
|
|
<dd><p>The node to insert below another node.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>below</em></dt>
|
|
<dd><p>The sibling node that will be above the inserted node.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>If the views are loaded, the subnode’s <a href="#//api/name/view">view</a> will be inserted below the given node’s <a href="#//api/name/view">view</a> in the hierarchy
|
|
even if there are other non-displaynode views.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.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 <a href="#//api/name/subnodes">subnodes</a> 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 <a href="#//api/name/layout">layout</a>.</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/measure:" title="measure:"></a>
|
|
<h3 class="subsubtitle method-title">measure:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Asks the node to calculate and return the size that best fits its <a href="#//api/name/subnodes">subnodes</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (CGSize)measure:(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>size</em></dt>
|
|
<dd><p>The current size of the receiver.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection return">
|
|
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
|
<p>A new size that fits the receiver’s subviews.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Though this method does not set the <a href="#//api/name/bounds">bounds</a> of the <a href="#//api/name/view">view</a>, it does have side effects–caching both the
|
|
constraint and the result.</p><div class="warning"><p><strong>Warning:</strong> Subclasses must not override this; it caches results from <a href="#//api/name/calculateSizeThatFits:">calculateSizeThatFits:</a>. Calling this method may
|
|
be expensive if result is not cached.</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/calculateSizeThatFits:">- calculateSizeThatFits:</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.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/pointInside:withEvent:" title="pointInside:withEvent:"></a>
|
|
<h3 class="subsubtitle method-title">pointInside:withEvent:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Returns a Boolean value indicating whether the receiver contains the specified point.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (BOOL)pointInside:(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 that is in the receiver’s local coordinate system (<a href="#//api/name/bounds">bounds</a>).</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>YES if point is inside the receiver’s <a href="#//api/name/bounds">bounds</a>; otherwise, NO.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Includes the “slop” factor specified with <a href="#//api/name/hitTestSlop">hitTestSlop</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/recursiveSetPreventOrCancelDisplay:" title="recursiveSetPreventOrCancelDisplay:"></a>
|
|
<h3 class="subsubtitle method-title">recursiveSetPreventOrCancelDisplay:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Prevent the node and its descendants' <a href="#//api/name/layer">layer</a> from displaying.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)recursiveSetPreventOrCancelDisplay:(id)<em>flag</em></code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection see-also-section">
|
|
<h4 class="method-subtitle">See Also</h4>
|
|
<ul>
|
|
|
|
<li><code><p><a href="#//api/name/preventOrCancelDisplay">@property preventOrCancelDisplay</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.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 <a href="#//api/name/setNeedsDisplayAtScale:">setNeedsDisplayAtScale:</a> on <a href="#//api/name/subnodes">subnodes</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)recursivelySetNeedsDisplayAtScale:(id)<em>contentsScale</em></code></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 <a href="#//api/name/view">view</a> or <a href="#//api/name/layer">layer</a> 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/removeFromSupernode" title="removeFromSupernode"></a>
|
|
<h3 class="subsubtitle method-title">removeFromSupernode</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Remove this node from its <a href="#//api/name/supernode">supernode</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)removeFromSupernode</code></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>The node’s <a href="#//api/name/view">view</a> will be automatically removed from the supernode’s <a href="#//api/name/view">view</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.h</code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="section-method">
|
|
<a name="//api/name/replaceSubnode:withSubnode:" title="replaceSubnode:withSubnode:"></a>
|
|
<h3 class="subsubtitle method-title">replaceSubnode:withSubnode:</h3>
|
|
|
|
|
|
|
|
<div class="method-subsection brief-description">
|
|
<p>Replace subnode with replacementSubnode.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="method-subsection method-declaration"><code>- (void)replaceSubnode:(id)<em>subnode</em> withSubnode:(id)<em>replacementSubnode</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>subnode</em></dt>
|
|
<dd><p>A subnode of self.</p></dd>
|
|
</dl>
|
|
|
|
<dl class="argument-def parameter-def">
|
|
<dt><em>replacementSubnode</em></dt>
|
|
<dd><p>A node with which to replace subnode.</p></dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Should both subnode and replacementSubnode already be <a href="#//api/name/subnodes">subnodes</a> of self, subnode is removed and
|
|
replacementSubnode inserted in its place.
|
|
If subnode is not a subnode of self, this method will throw an exception.
|
|
If replacementSubnode is nil, this method will throw an exception</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection declared-in-section">
|
|
<h4 class="method-subtitle">Declared In</h4>
|
|
<code class="declared-in-ref">ASDisplayNode.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 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.</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/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/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 <a href="#//api/name/view">view</a>.</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 <a href="#//api/name/view">view</a>.</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 <a href="#//api/name/view">view</a>.</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 <a href="#//api/name/view">view</a>.</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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</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">© 2014 Facebook. All rights reserved. (Last updated: 2014-10-10)</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> |