Files
AsyncDisplayKit/appledoc/Categories/ASDisplayNode+UIViewBridge.html
2015-09-16 14:54:25 +03:00

346 lines
8.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ASDisplayNode(UIViewBridge) Category Reference</title>
<link rel="stylesheet" href="../css/style.css">
<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
<meta name="generator" content="appledoc 2.2.1 (build 1333)">
</head>
<body class="appledoc">
<header>
<div class="container" class="hide-in-xcode">
<h1 id="library-title">
<a href="../index.html">AsyncDisplayKit </a>
</h1>
<p id="developer-home">
<a href="../index.html">Facebook</a>
</p>
</div>
</header>
<aside>
<div class="container">
<nav>
<ul id="header-buttons" role="toolbar">
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
<li id="on-this-page" role="navigation">
<label>
On This Page
<div class="chevron">
<div class="chevy chevron-left"></div>
<div class="chevy chevron-right"></div>
</div>
<select id="jump-to">
<option value="top">Jump To&#133;</option>
<option value="overview">Overview</option>
<option value="tasks">Tasks</option>
<optgroup label="Properties">
<option value="//api/name/backgroundColor">backgroundColor</option>
<option value="//api/name/contentMode">contentMode</option>
</optgroup>
<optgroup label="Instance Methods">
<option value="//api/name/setNeedsDisplay">- setNeedsDisplay</option>
<option value="//api/name/setNeedsLayout">- setNeedsLayout</option>
</optgroup>
</select>
</label>
</li>
</ul>
</nav>
</div>
</aside>
<article>
<div id="overview_contents" class="container">
<div id="content">
<main role="main">
<h1 class="title">ASDisplayNode(UIViewBridge) Category Reference</h1>
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<th>Declared in</th>
<td>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>
<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/layer to be created, and will be applied when it is created (when the view
or layer property is accessed).</p>
<p>After the view is created, the properties pass through to the view directly as if called on the main thread.</p>
<p>See UIView and CALayer for documentation on these common properties.</p>
</div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<div class="task-list">
<div class="section-method">
<a name="//api/name/setNeedsDisplay" title="setNeedsDisplay"></a>
<h3 class="method-title"><code><a href="#//api/name/setNeedsDisplay">&ndash;&nbsp;setNeedsDisplay</a></code>
</h3>
<div class="method-info">
<div class="pointy-thing"></div>
<div class="method-info-container">
<div class="method-subsection brief-description">
<p>Marks the view as needing display. Convenience for use whether the view / layer is loaded or not. Safe to call from a background thread.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setNeedsDisplay</code></div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASDisplayNode.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/setNeedsLayout" title="setNeedsLayout"></a>
<h3 class="method-title"><code><a href="#//api/name/setNeedsLayout">&ndash;&nbsp;setNeedsLayout</a></code>
</h3>
<div class="method-info">
<div class="pointy-thing"></div>
<div class="method-info-container">
<div class="method-subsection brief-description">
<p>Marks the node as needing layout. Convenience for use whether the view / layer is loaded or not. Safe to call from a background thread.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setNeedsLayout</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>If this node was measured, calling this method triggers an internal relayout: the calculated layout is invalidated,
and the supernode is notified or (if this node is the root one) a full measurement pass is executed using the old constrained size.</p>
<p>Note: If the relayout causes a change in size of the root node that is attached to a container view
(table or collection view, for example), the container view must be notified to relayout.
For ASTableView and ASCollectionView, an empty batch editing transaction must be triggered to animate to new row / item sizes.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASDisplayNode.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/backgroundColor" title="backgroundColor"></a>
<h3 class="method-title"><code><a href="#//api/name/backgroundColor">&nbsp;&nbsp;backgroundColor</a></code>
</h3>
<div class="method-info">
<div class="pointy-thing"></div>
<div class="method-info-container">
<div class="method-subsection brief-description">
<p>The node view&rsquo;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 ASTextNode.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASDisplayNode.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/contentMode" title="contentMode"></a>
<h3 class="method-title"><code><a href="#//api/name/contentMode">&nbsp;&nbsp;contentMode</a></code>
</h3>
<div class="method-info">
<div class="pointy-thing"></div>
<div class="method-info-container">
<div class="method-subsection brief-description">
<p>A 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&rsquo;s contentMode property, but better. We do our own mapping to layer.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&rsquo;s being re-rendered.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASDisplayNode.h</code></p>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2015 Facebook. All rights reserved. Updated: 2015-09-16</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1333)</a>.</p>
</div>
</footer>
</div>
</div>
</article>
<script src="../js/script.js"></script>
</body>
</html>