mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-05-05 05:40:15 +08:00
Complete appledoc.
This commit is contained in:
719
appledoc/Protocols/ASRangeControllerDelegate.html
Normal file
719
appledoc/Protocols/ASRangeControllerDelegate.html
Normal file
@@ -0,0 +1,719 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
|
||||
<title>ASRangeControllerDelegate Protocol 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">ASRangeControllerDelegate Protocol 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="instance_methods">Instance Methods</option>
|
||||
|
||||
<option value="//api/name/rangeController:constrainedSizeForNodeAtIndexPath:"> - rangeController:constrainedSizeForNodeAtIndexPath:</option>
|
||||
|
||||
<option value="//api/name/rangeController:didSizeNodesWithIndexPaths:"> - rangeController:didSizeNodesWithIndexPaths:</option>
|
||||
|
||||
<option value="//api/name/rangeController:nodeForIndexPath:"> - rangeController:nodeForIndexPath:</option>
|
||||
|
||||
<option value="//api/name/rangeController:rowsInSection:"> - rangeController:rowsInSection:</option>
|
||||
|
||||
<option value="//api/name/rangeControllerSections:"> - rangeControllerSections:</option>
|
||||
|
||||
<option value="//api/name/rangeControllerViewportSize:"> - rangeControllerViewportSize:</option>
|
||||
|
||||
<option value="//api/name/rangeControllerVisibleNodeIndexPaths:"> - rangeControllerVisibleNodeIndexPaths:</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>
|
||||
|
||||
</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/rangeController:constrainedSizeForNodeAtIndexPath:">rangeController:constrainedSizeForNodeAtIndexPath:</a></span></li>
|
||||
|
||||
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/rangeController:didSizeNodesWithIndexPaths:">rangeController:didSizeNodesWithIndexPaths:</a></span></li>
|
||||
|
||||
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/rangeController:nodeForIndexPath:">rangeController:nodeForIndexPath:</a></span></li>
|
||||
|
||||
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/rangeController:rowsInSection:">rangeController:rowsInSection:</a></span></li>
|
||||
|
||||
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/rangeControllerSections:">rangeControllerSections:</a></span></li>
|
||||
|
||||
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/rangeControllerViewportSize:">rangeControllerViewportSize:</a></span></li>
|
||||
|
||||
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/rangeControllerVisibleNodeIndexPaths:">rangeControllerVisibleNodeIndexPaths:</a></span></li>
|
||||
|
||||
</ul></li>
|
||||
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<article>
|
||||
<div id="contents" class="isShowingTOC" role="main">
|
||||
<a title="ASRangeControllerDelegate Protocol 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">ASRangeControllerDelegate Protocol Reference</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container">
|
||||
|
||||
<div class="section section-specification"><table cellspacing="0"><tbody>
|
||||
<tr>
|
||||
<td class="specification-title">Conforms to</td>
|
||||
<td class="specification-value">NSObject</td>
|
||||
</tr><tr>
|
||||
<td class="specification-title">Declared in</td>
|
||||
<td class="specification-value">ASRangeController.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><a href="../Classes/ASRangeController.html">ASRangeController</a> delegate. For example, <a href="../Classes/ASTableView.html">ASTableView</a>.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="section section-tasks">
|
||||
<a title="Tasks" name="tasks"></a>
|
||||
<h2 class="subtitle subtitle-tasks">Tasks</h2>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="task-list">
|
||||
<li>
|
||||
<span class="tooltip">
|
||||
<code><a href="#//api/name/rangeControllerVisibleNodeIndexPaths:">– rangeControllerVisibleNodeIndexPaths:</a></code>
|
||||
</span>
|
||||
|
||||
<span class="task-item-suffix">required method</span>
|
||||
</li><li>
|
||||
<span class="tooltip">
|
||||
<code><a href="#//api/name/rangeControllerViewportSize:">– rangeControllerViewportSize:</a></code>
|
||||
</span>
|
||||
|
||||
<span class="task-item-suffix">required method</span>
|
||||
</li><li>
|
||||
<span class="tooltip">
|
||||
<code><a href="#//api/name/rangeControllerSections:">– rangeControllerSections:</a></code>
|
||||
</span>
|
||||
|
||||
<span class="task-item-suffix">required method</span>
|
||||
</li><li>
|
||||
<span class="tooltip">
|
||||
<code><a href="#//api/name/rangeController:rowsInSection:">– rangeController:rowsInSection:</a></code>
|
||||
</span>
|
||||
|
||||
<span class="task-item-suffix">required method</span>
|
||||
</li><li>
|
||||
<span class="tooltip">
|
||||
<code><a href="#//api/name/rangeController:nodeForIndexPath:">– rangeController:nodeForIndexPath:</a></code>
|
||||
</span>
|
||||
|
||||
<span class="task-item-suffix">required method</span>
|
||||
</li><li>
|
||||
<span class="tooltip">
|
||||
<code><a href="#//api/name/rangeController:constrainedSizeForNodeAtIndexPath:">– rangeController:constrainedSizeForNodeAtIndexPath:</a></code>
|
||||
</span>
|
||||
|
||||
<span class="task-item-suffix">required method</span>
|
||||
</li><li>
|
||||
<span class="tooltip">
|
||||
<code><a href="#//api/name/rangeController:didSizeNodesWithIndexPaths:">– rangeController:didSizeNodesWithIndexPaths:</a></code>
|
||||
</span>
|
||||
|
||||
<span class="task-item-suffix">required method</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</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/rangeController:constrainedSizeForNodeAtIndexPath:" title="rangeController:constrainedSizeForNodeAtIndexPath:"></a>
|
||||
<h3 class="subsubtitle method-title">rangeController:constrainedSizeForNodeAtIndexPath:</h3>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection brief-description">
|
||||
<p>Sender.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection method-declaration"><code>- (CGSize)rangeController:(id)<em>rangeController</em> constrainedSizeForNodeAtIndexPath:(id)<em>indexPath</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>rangeController</em></dt>
|
||||
<dd><p>Sender.</p></dd>
|
||||
</dl>
|
||||
|
||||
<dl class="argument-def parameter-def">
|
||||
<dt><em>indexPath</em></dt>
|
||||
<dd><p>Node to be sized.</p></dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection return">
|
||||
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
||||
<p>Sizing constraints for the node at <code>indexPath</code>, to be used as an argument to <a href="../Classes/ASDisplayNode.html#//api/name/measure:">[ASDisplayNode measure:]</a>.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection declared-in-section">
|
||||
<h4 class="method-subtitle">Declared In</h4>
|
||||
<code class="declared-in-ref">ASRangeController.h</code><br />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section-method">
|
||||
<a name="//api/name/rangeController:didSizeNodesWithIndexPaths:" title="rangeController:didSizeNodesWithIndexPaths:"></a>
|
||||
<h3 class="subsubtitle method-title">rangeController:didSizeNodesWithIndexPaths:</h3>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection brief-description">
|
||||
<p>Notifies the receiver that the specified nodes have been sized and are ready for display.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection method-declaration"><code>- (void)rangeController:(id)<em>rangeController</em> didSizeNodesWithIndexPaths:(id)<em>indexPaths</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>rangeController</em></dt>
|
||||
<dd><p>Sender.</p></dd>
|
||||
</dl>
|
||||
|
||||
<dl class="argument-def parameter-def">
|
||||
<dt><em>indexPaths</em></dt>
|
||||
<dd><p>Array of NSIndexPaths for the newly-sized nodes.</p></dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection declared-in-section">
|
||||
<h4 class="method-subtitle">Declared In</h4>
|
||||
<code class="declared-in-ref">ASRangeController.h</code><br />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section-method">
|
||||
<a name="//api/name/rangeController:nodeForIndexPath:" title="rangeController:nodeForIndexPath:"></a>
|
||||
<h3 class="subsubtitle method-title">rangeController:nodeForIndexPath:</h3>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection brief-description">
|
||||
<p>Sender.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection method-declaration"><code>- (ASCellNode *)rangeController:(id)<em>rangeController</em> nodeForIndexPath:(id)<em>indexPath</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>rangeController</em></dt>
|
||||
<dd><p>Sender.</p></dd>
|
||||
</dl>
|
||||
|
||||
<dl class="argument-def parameter-def">
|
||||
<dt><em>indexPath</em></dt>
|
||||
<dd><p>Index path for the node of interest.</p></dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection return">
|
||||
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
||||
<p>A new <ASCellNode> corresponding to <code>indexPath</code>.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection discussion-section">
|
||||
<h4 class="method-subtitle">Discussion</h4>
|
||||
<p><a href="../Classes/ASTableView.html">ASTableView</a> forwards this method to its data source.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection declared-in-section">
|
||||
<h4 class="method-subtitle">Declared In</h4>
|
||||
<code class="declared-in-ref">ASRangeController.h</code><br />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section-method">
|
||||
<a name="//api/name/rangeController:rowsInSection:" title="rangeController:rowsInSection:"></a>
|
||||
<h3 class="subsubtitle method-title">rangeController:rowsInSection:</h3>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection brief-description">
|
||||
<p>Sender.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection method-declaration"><code>- (NSInteger)rangeController:(id)<em>rangeController</em> rowsInSection:(id)<em>section</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>rangeController</em></dt>
|
||||
<dd><p>Sender.</p></dd>
|
||||
</dl>
|
||||
|
||||
<dl class="argument-def parameter-def">
|
||||
<dt><em>section</em></dt>
|
||||
<dd><p>Section.</p></dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection return">
|
||||
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
||||
<p>The number of rows in <code>section</code>.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection discussion-section">
|
||||
<h4 class="method-subtitle">Discussion</h4>
|
||||
<p><a href="../Classes/ASTableView.html">ASTableView</a> forwards this method to its data source.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection declared-in-section">
|
||||
<h4 class="method-subtitle">Declared In</h4>
|
||||
<code class="declared-in-ref">ASRangeController.h</code><br />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section-method">
|
||||
<a name="//api/name/rangeControllerSections:" title="rangeControllerSections:"></a>
|
||||
<h3 class="subsubtitle method-title">rangeControllerSections:</h3>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection brief-description">
|
||||
<p>Sender.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection method-declaration"><code>- (NSInteger)rangeControllerSections:(id)<em>rangeController</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>rangeController</em></dt>
|
||||
<dd><p>Sender.</p></dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection return">
|
||||
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
||||
<p>The number of total sections.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection discussion-section">
|
||||
<h4 class="method-subtitle">Discussion</h4>
|
||||
<p><a href="../Classes/ASTableView.html">ASTableView</a> forwards this method to its data source.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection declared-in-section">
|
||||
<h4 class="method-subtitle">Declared In</h4>
|
||||
<code class="declared-in-ref">ASRangeController.h</code><br />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section-method">
|
||||
<a name="//api/name/rangeControllerViewportSize:" title="rangeControllerViewportSize:"></a>
|
||||
<h3 class="subsubtitle method-title">rangeControllerViewportSize:</h3>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection brief-description">
|
||||
<p>Sender.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection method-declaration"><code>- (CGSize)rangeControllerViewportSize:(id)<em>rangeController</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>rangeController</em></dt>
|
||||
<dd><p>Sender.</p></dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection return">
|
||||
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
||||
<p>the receiver’s viewport size (i.e., the screen space occupied by the visible range).</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection declared-in-section">
|
||||
<h4 class="method-subtitle">Declared In</h4>
|
||||
<code class="declared-in-ref">ASRangeController.h</code><br />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="section-method">
|
||||
<a name="//api/name/rangeControllerVisibleNodeIndexPaths:" title="rangeControllerVisibleNodeIndexPaths:"></a>
|
||||
<h3 class="subsubtitle method-title">rangeControllerVisibleNodeIndexPaths:</h3>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection brief-description">
|
||||
<p>Sender.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection method-declaration"><code>- (NSArray *)rangeControllerVisibleNodeIndexPaths:(id)<em>rangeController</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>rangeController</em></dt>
|
||||
<dd><p>Sender.</p></dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection return">
|
||||
<h4 class="method-subtitle parameter-title">Return Value</h4>
|
||||
<p>an array of index paths corresponding to the nodes currently visible onscreen (i.e., the visible range).</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-subsection declared-in-section">
|
||||
<h4 class="method-subtitle">Declared In</h4>
|
||||
<code class="declared-in-ref">ASRangeController.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-17)</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>
|
||||
Reference in New Issue
Block a user