Files
GitHawk/Local Pods/SwipeCellKit/docs/Classes/SwipeTableViewCell.html
James Sherlock c28c088629 Initial repository spring clean (#415)
* Move SwipeCellKit & SlackTextViewController to Local Pods directory

* Move playgrounds to own folder

* Create podspec for MMMarkdown and move to Local Pods
2017-09-24 18:35:05 -04:00

365 lines
19 KiB
HTML
Executable File
Raw Permalink 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 lang="en">
<head>
<title>SwipeTableViewCell Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/SwipeTableViewCell" class="dashAnchor"></a>
<a title="SwipeTableViewCell Class Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">SwipeCellKit Docs</a> (100% documented)</p>
<p class="header-right"><a href="https://github.com/jerkoch/SwipeCellKit"><img src="../img/gh.png"/>View on GitHub</a></p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">SwipeCellKit Reference</a>
<img id="carat" src="../img/carat.png" />
SwipeTableViewCell Class Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Guides.html">Guides</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../advanced.html">Advanced</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/SwipeAction.html">SwipeAction</a>
</li>
<li class="nav-group-task">
<a href="../Classes/SwipeTableViewCell.html">SwipeTableViewCell</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enums</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/ExpansionFulfillmentStyle.html">ExpansionFulfillmentStyle</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SwipeActionStyle.html">SwipeActionStyle</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SwipeActionsOrientation.html">SwipeActionsOrientation</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SwipeTransitionStyle.html">SwipeTransitionStyle</a>
</li>
<li class="nav-group-task">
<a href="../Enums/SwipeVerticalAlignment.html">SwipeVerticalAlignment</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/SwipeActionTransitioning.html">SwipeActionTransitioning</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/SwipeExpanding.html">SwipeExpanding</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/SwipeTableViewCellDelegate.html">SwipeTableViewCellDelegate</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Structs.html">Structs</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Structs/ScaleAndAlphaExpansion.html">ScaleAndAlphaExpansion</a>
</li>
<li class="nav-group-task">
<a href="../Structs/ScaleTransition.html">ScaleTransition</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SwipeActionTransitioningContext.html">SwipeActionTransitioningContext</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SwipeExpansionAnimationTimingParameters.html">SwipeExpansionAnimationTimingParameters</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SwipeExpansionStyle.html">SwipeExpansionStyle</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SwipeExpansionStyle/Target.html"> Target</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SwipeExpansionStyle/Trigger.html"> Trigger</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SwipeExpansionStyle/CompletionAnimation.html"> CompletionAnimation</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SwipeExpansionStyle/FillOptions.html"> FillOptions</a>
</li>
<li class="nav-group-task">
<a href="../Structs/SwipeTableOptions.html">SwipeTableOptions</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>SwipeTableViewCell</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="n">open</span> <span class="kd">class</span> <span class="kt">SwipeTableViewCell</span><span class="p">:</span> <span class="kt">UITableViewCell</span></code></pre>
</div>
</div>
<p>The <code>SwipeTableViewCell</code> class extends <code>UITableViewCell</code> and provides more flexible options for cell swiping behavior.</p>
<p>The default behavior closely matches the stock Mail.app. If you want to customize the transition style (ie. how the action buttons are exposed), or the expansion style (the behavior when the row is swiped passes a defined threshold), you can return the appropriately configured <code><a href="../Structs/SwipeTableOptions.html">SwipeTableOptions</a></code> via the <code><a href="../Protocols/SwipeTableViewCellDelegate.html">SwipeTableViewCellDelegate</a></code> delegate.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:vC12SwipeCellKit18SwipeTableViewCell8delegateXwGSqPS_26SwipeTableViewCellDelegate__"></a>
<a name="//apple_ref/swift/Property/delegate" class="dashAnchor"></a>
<a class="token" href="#/s:vC12SwipeCellKit18SwipeTableViewCell8delegateXwGSqPS_26SwipeTableViewCellDelegate__">delegate</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The object that acts as the delegate of the <code>SwipeTableViewCell</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">delegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SwipeTableViewCellDelegate.html">SwipeTableViewCellDelegate</a></span><span class="p">?</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:vC12SwipeCellKit18SwipeTableViewCell11swipeOffsetV12CoreGraphics7CGFloat"></a>
<a name="//apple_ref/swift/Property/swipeOffset" class="dashAnchor"></a>
<a class="token" href="#/s:vC12SwipeCellKit18SwipeTableViewCell11swipeOffsetV12CoreGraphics7CGFloat">swipeOffset</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The point at which the origin of the cell is offset from the non-swiped origin.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">swipeOffset</span><span class="p">:</span> <span class="kt">CGFloat</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FC12SwipeCellKit18SwipeTableViewCell9hideSwipeFT8animatedSb10completionGSqFSbT___T_"></a>
<a name="//apple_ref/swift/Method/hideSwipe(animated:completion:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC12SwipeCellKit18SwipeTableViewCell9hideSwipeFT8animatedSb10completionGSqFSbT___T_">hideSwipe(animated:completion:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Hides the swipe actions and returns the cell to center.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">hideSwipe</span><span class="p">(</span><span class="nv">animated</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">((</span><span class="kt">Bool</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>animated</em>
</code>
</td>
<td>
<div>
<p>Specify <code>true</code> to animate the hiding of the swipe actions or <code>false</code> to hide it immediately.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>completion</em>
</code>
</td>
<td>
<div>
<p>The closure to be executed once the animation has finished. A <code>Boolean</code> argument indicates whether or not the animations actually finished before the completion handler was called.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FC12SwipeCellKit18SwipeTableViewCell9showSwipeFT11orientationOS_23SwipeActionsOrientation8animatedSb10completionGSqFSbT___T_"></a>
<a name="//apple_ref/swift/Method/showSwipe(orientation:animated:completion:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC12SwipeCellKit18SwipeTableViewCell9showSwipeFT11orientationOS_23SwipeActionsOrientation8animatedSb10completionGSqFSbT___T_">showSwipe(orientation:animated:completion:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Shows the swipe actions for the specified orientation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">showSwipe</span><span class="p">(</span><span class="nv">orientation</span><span class="p">:</span> <span class="kt"><a href="../Enums/SwipeActionsOrientation.html">SwipeActionsOrientation</a></span><span class="p">,</span> <span class="nv">animated</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">((</span><span class="kt">Bool</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>orientation</em>
</code>
</td>
<td>
<div>
<p>The side of the cell on which to show the swipe actions.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>animated</em>
</code>
</td>
<td>
<div>
<p>Specify <code>true</code> to animate the showing of the swipe actions or <code>false</code> to show them immediately.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>completion</em>
</code>
</td>
<td>
<div>
<p>The closure to be executed once the animation has finished. A <code>Boolean</code> argument indicates whether or not the animations actually finished before the completion handler was called.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FC12SwipeCellKit18SwipeTableViewCell14setSwipeOffsetFTV12CoreGraphics7CGFloat8animatedSb10completionGSqFSbT___T_"></a>
<a name="//apple_ref/swift/Method/setSwipeOffset(_:animated:completion:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC12SwipeCellKit18SwipeTableViewCell14setSwipeOffsetFTV12CoreGraphics7CGFloat8animatedSb10completionGSqFSbT___T_">setSwipeOffset(_:animated:completion:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The point at which the origin of the cell is offset from the non-swiped origin.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">setSwipeOffset</span><span class="p">(</span><span class="n">_</span> <span class="nv">offset</span><span class="p">:</span> <span class="kt">CGFloat</span><span class="p">,</span> <span class="nv">animated</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">((</span><span class="kt">Bool</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://twitter.com/jerkoch" target="_blank" rel="external">Jeremy Koch</a>. All rights reserved. (Last updated: 2017-06-17)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.2</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>