Peter 9bc996374f Add 'submodules/AsyncDisplayKit/' from commit '02bedc12816e251ad71777f9d2578329b6d2bef6'
git-subtree-dir: submodules/AsyncDisplayKit
git-subtree-mainline: d06f423e0ed3df1fed9bd10d79ee312a9179b632
git-subtree-split: 02bedc12816e251ad71777f9d2578329b6d2bef6
2019-06-11 18:42:43 +01:00

796 lines
19 KiB
HTML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ASLayoutElementStyle Class 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 1334)">
</head>
<body class="appledoc">
<header>
<div class="container" class="hide-in-xcode">
<h1 id="library-title">
<a href="../index.html"> </a>
</h1>
<p id="developer-home">
<a href="../index.html">AsyncDisplayKit</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="tasks">Tasks</option>
<optgroup label="Properties">
<option value="//api/name/delegate">delegate</option>
<option value="//api/name/height">height</option>
<option value="//api/name/maxHeight">maxHeight</option>
<option value="//api/name/maxLayoutSize">maxLayoutSize</option>
<option value="//api/name/maxSize">maxSize</option>
<option value="//api/name/maxWidth">maxWidth</option>
<option value="//api/name/minHeight">minHeight</option>
<option value="//api/name/minLayoutSize">minLayoutSize</option>
<option value="//api/name/minSize">minSize</option>
<option value="//api/name/minWidth">minWidth</option>
<option value="//api/name/preferredLayoutSize">preferredLayoutSize</option>
<option value="//api/name/preferredSize">preferredSize</option>
<option value="//api/name/width">width</option>
</optgroup>
<optgroup label="Instance Methods">
<option value="//api/name/initWithDelegate:">- initWithDelegate:</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">ASLayoutElementStyle Class Reference</h1>
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<th>Inherits from</th>
<td>NSObject</td>
</tr><tr>
<th>Conforms to</th>
<td><a href="../Protocols/ASAbsoluteLayoutElement.html">ASAbsoluteLayoutElement</a><br /><a href="../Protocols/ASStackLayoutElement.html">ASStackLayoutElement</a></td>
</tr><tr>
<th>Declared in</th>
<td>ASLayoutElement.h</td>
</tr>
</tbody></table></div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<div class="task-list">
<div class="section-method">
<a name="//api/name/initWithDelegate:" title="initWithDelegate:"></a>
<h3 class="method-title"><code><a href="#//api/name/initWithDelegate:">&ndash;&nbsp;initWithDelegate:</a></code>
</h3>
<div class="method-info">
<div class="pointy-thing"></div>
<div class="method-info-container">
<div class="method-subsection brief-description">
<p>Initializes the layoutElement style with a specified delegate</p>
</div>
<div class="method-subsection method-declaration"><code>- (instancetype)initWithDelegate:(id&lt;ASLayoutElementStyleDelegate&gt;)<em>delegate</em></code></div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/delegate" title="delegate"></a>
<h3 class="method-title"><code><a href="#//api/name/delegate">&nbsp;&nbsp;delegate</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 object that acts as the delegate of the style.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nullable, nonatomic, weak, readonly) id&lt;ASLayoutElementStyleDelegate&gt; delegate</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The delegate must adopt the ASLayoutElementStyleDelegate protocol. The delegate is not retained.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/width" title="width"></a>
<h3 class="method-title"><code><a href="#//api/name/width">&nbsp;&nbsp;width</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 width property specifies the height of the content area of an ASLayoutElement.
The minWidth and maxWidth properties override width.
Defaults to ASDimensionAuto</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) ASDimension width</code></div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/height" title="height"></a>
<h3 class="method-title"><code><a href="#//api/name/height">&nbsp;&nbsp;height</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 height property specifies the height of the content area of an ASLayoutElement
The minHeight and maxHeight properties override height.
Defaults to ASDimensionAuto</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) ASDimension height</code></div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/minHeight" title="minHeight"></a>
<h3 class="method-title"><code><a href="#//api/name/minHeight">&nbsp;&nbsp;minHeight</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 minHeight property is used to set the minimum height of a given element. It prevents the used value
of the height property from becoming smaller than the value specified for minHeight.
The value of minHeight overrides both maxHeight and height.
Defaults to ASDimensionAuto</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) ASDimension minHeight</code></div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/maxHeight" title="maxHeight"></a>
<h3 class="method-title"><code><a href="#//api/name/maxHeight">&nbsp;&nbsp;maxHeight</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 maxHeight property is used to set the maximum height of an element. It prevents the used value of the
height property from becoming larger than the value specified for maxHeight.
The value of maxHeight overrides height, but minHeight overrides maxHeight.
Defaults to ASDimensionAuto</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) ASDimension maxHeight</code></div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/minWidth" title="minWidth"></a>
<h3 class="method-title"><code><a href="#//api/name/minWidth">&nbsp;&nbsp;minWidth</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 minWidth property is used to set the minimum width of a given element. It prevents the used value of
the width property from becoming smaller than the value specified for minWidth.
The value of minWidth overrides both maxWidth and width.
Defaults to ASDimensionAuto</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) ASDimension minWidth</code></div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/maxWidth" title="maxWidth"></a>
<h3 class="method-title"><code><a href="#//api/name/maxWidth">&nbsp;&nbsp;maxWidth</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 maxWidth property is used to set the maximum width of a given element. It prevents the used value of
the width property from becoming larger than the value specified for maxWidth.
The value of maxWidth overrides width, but minWidth overrides maxWidth.
Defaults to ASDimensionAuto</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) ASDimension maxWidth</code></div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/preferredSize" title="preferredSize"></a>
<h3 class="method-title"><code><a href="#//api/name/preferredSize">&nbsp;&nbsp;preferredSize</a></code>
</h3>
<div class="method-info">
<div class="pointy-thing"></div>
<div class="method-info-container">
<div class="method-subsection brief-description">
<p>Provides a suggested size for a layout element. If the optional minSize or maxSize are provided,
and the preferredSize exceeds these, the minSize or maxSize will be enforced. If this optional value is not
provided, the layout elements size will default to its intrinsic content size provided calculateSizeThatFits:</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) CGSize preferredSize</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>This method is optional, but one of either preferredSize or preferredLayoutSize is required
for nodes that either have no intrinsic content size or
should be laid out at a different size than its intrinsic content size. For example, this property could be
set on an ASImageNode to display at a size different from the underlying image size.</p><div class="warning"><p><strong>Warning:</strong> Calling the getter when the size&rsquo;s width or height are relative will cause an assert.</p></div>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/minSize" title="minSize"></a>
<h3 class="method-title"><code><a href="#//api/name/minSize">&nbsp;&nbsp;minSize</a></code>
</h3>
<div class="method-info">
<div class="pointy-thing"></div>
<div class="method-info-container">
<div class="method-subsection brief-description">
<p>An optional property that provides a minimum size bound for a layout element. If provided, this restriction will
always be enforced. If a parent layout elements minimum size is smaller than its childs minimum size, the childs
minimum size will be enforced and its size will extend out of the layout specs.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) CGSize minSize</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>For example, if you set a preferred relative width of 50% and a minimum width of 200 points on an
element in a full screen container, this would result in a width of 160 points on an iPhone screen. However,
since 160 pts is lower than the minimum width of 200 pts, the minimum width would be used.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/maxSize" title="maxSize"></a>
<h3 class="method-title"><code><a href="#//api/name/maxSize">&nbsp;&nbsp;maxSize</a></code>
</h3>
<div class="method-info">
<div class="pointy-thing"></div>
<div class="method-info-container">
<div class="method-subsection brief-description">
<p>An optional property that provides a maximum size bound for a layout element. If provided, this restriction will
always be enforced. If a child layout elements maximum size is smaller than its parent, the childs maximum size will
be enforced and its size will extend out of the layout specs.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) CGSize maxSize</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>For example, if you set a preferred relative width of 50% and a maximum width of 120 points on an
element in a full screen container, this would result in a width of 160 points on an iPhone screen. However,
since 160 pts is higher than the maximum width of 120 pts, the maximum width would be used.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/preferredLayoutSize" title="preferredLayoutSize"></a>
<h3 class="method-title"><code><a href="#//api/name/preferredLayoutSize">&nbsp;&nbsp;preferredLayoutSize</a></code>
</h3>
<div class="method-info">
<div class="pointy-thing"></div>
<div class="method-info-container">
<div class="method-subsection brief-description">
<p>Provides a suggested RELATIVE size for a layout element. An ASLayoutSize uses percentages rather
than points to specify layout. E.g. width should be 50% of the parents width. If the optional minLayoutSize or
maxLayoutSize are provided, and the preferredLayoutSize exceeds these, the minLayoutSize or maxLayoutSize
will be enforced. If this optional value is not provided, the layout elements size will default to its intrinsic content size
provided calculateSizeThatFits:</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) ASLayoutSize preferredLayoutSize</code></div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/minLayoutSize" title="minLayoutSize"></a>
<h3 class="method-title"><code><a href="#//api/name/minLayoutSize">&nbsp;&nbsp;minLayoutSize</a></code>
</h3>
<div class="method-info">
<div class="pointy-thing"></div>
<div class="method-info-container">
<div class="method-subsection brief-description">
<p>An optional property that provides a minimum RELATIVE size bound for a layout element. If provided, this
restriction will always be enforced. If a parent layout elements minimum relative size is smaller than its childs minimum
relative size, the childs minimum relative size will be enforced and its size will extend out of the layout specs.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) ASLayoutSize minLayoutSize</code></div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div><div class="section-method">
<a name="//api/name/maxLayoutSize" title="maxLayoutSize"></a>
<h3 class="method-title"><code><a href="#//api/name/maxLayoutSize">&nbsp;&nbsp;maxLayoutSize</a></code>
</h3>
<div class="method-info">
<div class="pointy-thing"></div>
<div class="method-info-container">
<div class="method-subsection brief-description">
<p>An optional property that provides a maximum RELATIVE size bound for a layout element. If provided, this
restriction will always be enforced. If a parent layout elements maximum relative size is smaller than its childs maximum
relative size, the childs maximum relative size will be enforced and its size will extend out of the layout specs.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign, readwrite) ASLayoutSize maxLayoutSize</code></div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<p><code class="declared-in-ref">ASLayoutElement.h</code></p>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2016 AsyncDisplayKit. All rights reserved. Updated: 2016-11-05</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
</div>
</footer>
</div>
</div>
</article>
<script src="../js/script.js"></script>
</body>
</html>