mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-04-19 07:16:51 +08:00
9a8c2d0[site] Tweak appledoc script.a8e9d75[site] appledoc -> api navbar link.c2e6babMerge pull request #44 from acoomans/css-fix-code-highlight9528cdeMerge pull request #45 from acoomans/css-fix-brand-color983873aChanged code highlighting to match Xcode's33ec050Changed code background colore15ce0fChanged css brand color to blue from logo
2315 lines
64 KiB
HTML
2315 lines
64 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/displaysAsynchronously"> displaysAsynchronously</option>
|
|
|
|
<option value="//api/name/hitTestSlop"> hitTestSlop</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="instance_methods">Instance Methods</option>
|
|
|
|
<option value="//api/name/addSubnode:"> - addSubnode:</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/displayImmediately"> - displayImmediately</option>
|
|
|
|
<option value="//api/name/displayNodeRecursiveDescription"> - displayNodeRecursiveDescription</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/measure:"> - measure:</option>
|
|
|
|
<option value="//api/name/pointInside:withEvent:"> - pointInside:withEvent:</option>
|
|
|
|
<option value="//api/name/recursiveSetPreventOrCancelDisplay:"> - recursiveSetPreventOrCancelDisplay:</option>
|
|
|
|
<option value="//api/name/removeFromSupernode"> - removeFromSupernode</option>
|
|
|
|
<option value="//api/name/replaceSubnode:withSubnode:"> - replaceSubnode:withSubnode:</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>
|
|
|
|
</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/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/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="#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/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/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/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/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/removeFromSupernode">removeFromSupernode</a></span></li>
|
|
|
|
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/replaceSubnode:withSubnode:">replaceSubnode:withSubnode:</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>
|
|
|
|
</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 calculateSizeThatFits:.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>Ideal for use by subclasses in -layout, 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 -calculateSizeThatFits:.</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 calculateSizeThatFits:.</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/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 layout, 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 layout, 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/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="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/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/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/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 -layout 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 -layout 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 viewClass.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-subsection discussion-section">
|
|
<h4 class="method-subtitle">Discussion</h4>
|
|
<p>If viewClass is not a subclass of _ASDisplayView, it will still render synchronously and -layout 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/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 -calculateSizeThatFits:. Calling this method may
|
|
be expensive if result is not cached.</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/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/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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</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-14)</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> |